summaryrefslogtreecommitdiff
path: root/Source/cmIfCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-07-11 10:40:04 -0400
committerBrad King <brad.king@kitware.com>2012-07-11 10:40:04 -0400
commit674c56c3fcf63732672b778781dc57f7bc3c8d02 (patch)
treea9dc445d0b3cf3dc4d47fb9bfb8de0938fe8eebc /Source/cmIfCommand.h
parent6274ca6f910683495124d22e371a1adc9cf0eebc (diff)
downloadcmake-674c56c3fcf63732672b778781dc57f7bc3c8d02.tar.gz
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.
Diffstat (limited to 'Source/cmIfCommand.h')
-rw-r--r--Source/cmIfCommand.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h
index 83ea8a4744..94e4d998a0 100644
--- a/Source/cmIfCommand.h
+++ b/Source/cmIfCommand.h
@@ -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."