<div dir="ltr"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Le mar. 13 nov. 2018 à 10:41, Marc CHEVRIER <<a href="mailto:marc.chevrier@gmail.com">marc.chevrier@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I agree as well that trying to distinguish macros from functions is not a good idea because functions can act in the same way as macros (i.e. changing calling environment) but with a better control over environment changes (changes are done explicitly by using 'set(... PARENT_SCOPE)').<div><br></div><div>so also +1 <span style="color:rgb(33,33,33)">for lower case for every function, macro or builtin. And good point to standardize </span> <span style="color:rgb(33,33,33)">macro or function OPTION to UPPERCASE.</span></div><div><font color="#212121"><br></font></div><div><font color="#212121">Now, for variables, the problem is a bit different because they are case sensitive: 'set(my_var ...)' and 'set (MY_VAR ...)' will create two different variables.</font></div></div></blockquote><div><br></div><div>Yes damn right.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><font color="#212121">My personal tendency is to use lower case for local variables and upper case for global variables. May be we can normalize variables to upper case regarding global variables used by CMake itself (which is globally the current rule).</font></div></div></blockquote><div><br></div><div>Having a convention for local is nice and I tend to prefix with _ (single or double) variables that should be local.</div><div>lowercasing locals is fine too, however I think that enforcing casing on "user-defined" variable may not be desirable, concerning CMAKE_ CTEST_ and CPACK_ </div><div>I guess they already are all UPPERCASE so we may stick with this as a convention?</div><div><br></div><div>A small quote to the cmake-format (<a href="https://github.com/cheshirekow/cmake_format">https://github.com/cheshirekow/cmake_format</a>) tool which is trying to beautify CMakeLists.txt, I'm not using it on complex projects</div><div>because it still has some issues but I find it otherwise useful.</div><div><br></div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div></div>