[CMake] Deleting a variable

Alexander Neundorf a.neundorf-work at gmx.net
Mon Dec 4 18:51:44 EST 2006


Hi,


Von: James Bigler <bigler at cs.utah.edu>

> I have some optional code that runs and creates some variables
> 
> IF(MY_VAR)
>    SET(MY_OTHER_VAR 2)
> ENDIF(MY_VAR)
> 
> If I turn off MY_VAR, I want MY_OTHER_VAR to do away like this:
> 
> IF(MY_VAR)
>    SET(MY_OTHER_VAR 2)
> ELSE(MY_VAR)
>    DELETE(MY_OTHER_VAR)
> ENDIF(MY_VAR)

SET(MY_OTHER_VAR)
or
SET(MY_OTHER_VAR FALSE)
should have the same effect, at least both will evaluate to false.
Is this good enough or do you need more ?

Bye
Alex


-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


More information about the CMake mailing list