Ken,

> A macro in cmake is a bit like a cpp macro. It is a string 
> replacement operation that replaces ${varname} with the 
> actual argument to the macro.
> [...]
> After string replacement of ${boolarg} with TRUE looks like
> 
> MACRO (MYMACRO boolarg)
>       MESSAGE ("MYMACRO(TRUE)")
>       IF (boolarg)
> 
> The IF statement tests to see if there is a variable defined 
> named boolarg and there is not (there have been no SETS done 
> on boolarg) and so the conditional is false. So the trick is 
> that macros need to be thought of as only doing string 
> replacements on ${something}.

Thanks, this makes perfect sense, and I understand you not wanting to
change this behaviour.

 - TrevK
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to