if: Document that macro arguments are not variables (#13393)
A common mistake is to write macro(foo arg) if(arg) endif() endmacro() and expect if() to treat "arg" as a variable. The documentation of the macro() command already states that arguments are not variables, but users writing the if() command may not look at the macro() docs. Add a note to the if() documentation.
This commit is contained in:
parent
6274ca6f91
commit
674c56c3fc
|
@ -123,6 +123,7 @@ public:
|
|||
" if(<variable>)\n"
|
||||
"True if the variable is defined to a value that is not a false "
|
||||
"constant. False otherwise. "
|
||||
"(Note macro arguments are not variables.)"
|
||||
"\n"
|
||||
" if(NOT <expression>)\n"
|
||||
"True if the expression is not true."
|
||||
|
|
Loading…
Reference in New Issue