From 674c56c3fcf63732672b778781dc57f7bc3c8d02 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 11 Jul 2012 10:40:04 -0400 Subject: [PATCH] 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. --- Source/cmIfCommand.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h index 83ea8a474..94e4d998a 100644 --- a/Source/cmIfCommand.h +++ b/Source/cmIfCommand.h @@ -123,6 +123,7 @@ public: " if()\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 )\n" "True if the expression is not true."