[CMake] override variable in macro
Bill Hoffman
bill.hoffman at kitware.com
Fri Sep 21 12:14:48 EDT 2007
Juan Sanchez wrote:
> What I was trying to do was to avoid having to create a local variable.
> The macro parameter is the default, which can be overridden if necessary.
>
> Now I immediately have to set a new variable with the value of the
> parameter. So I now have to account for another variable being created
> which may then escape the macro's namespace.
>
> Can we have the SET command fail on trying to set a macro parameter?
>
You are thinking about macros in the wrong way. Think of them as c or
c++ #define macro's.
Basically, they do nothing more than string replacement.
-Bill
More information about the CMake
mailing list