Help: in macro vs function example, use lowercase names.

Follow our own advise not to change cases.

Omit the leading underscore.
This commit is contained in:
Joachim Wuttke (l)
2018-11-14 09:10:31 +01:00
parent 117272412e
commit b90ae70a3b

View File

@@ -98,18 +98,18 @@ existing variable instead of the arguments. For example:
.. code-block:: cmake
macro(_BAR)
macro(bar)
foreach(arg IN LISTS ARGN)
<commands>
endforeach()
endmacro()
function(_FOO)
_bar(x y z)
function(foo)
bar(x y z)
endfunction()
_foo(a b c)
foo(a b c)
Will loop over ``a;b;c`` and not over ``x;y;z`` as one might be expecting.
Will loop over ``a;b;c`` and not over ``x;y;z`` as one might have expected.
If you want true CMake variables and/or better CMake scope control you
should look at the function command.