summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-07-11 14:40:04 (GMT)
committerBrad King <brad.king@kitware.com>2012-07-11 14:40:04 (GMT)
commit674c56c3fcf63732672b778781dc57f7bc3c8d02 (patch)
treea9dc445d0b3cf3dc4d47fb9bfb8de0938fe8eebc /Source
parent6274ca6f910683495124d22e371a1adc9cf0eebc (diff)
downloadCMake-674c56c3fcf63732672b778781dc57f7bc3c8d02.zip
CMake-674c56c3fcf63732672b778781dc57f7bc3c8d02.tar.gz
CMake-674c56c3fcf63732672b778781dc57f7bc3c8d02.tar.bz2
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')
-rw-r--r--Source/cmIfCommand.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h
index 83ea8a4..94e4d99 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."