[CMake] evaluating a simple boolean expression?

Brandon J. Van Every bvanevery at gmail.com
Thu Mar 30 15:04:13 EST 2006


Brad King wrote:
> In this particular case there is an easy fix.  The value 
> EXTANT_CHICKEN-NOTFOUND is considered false for the variable 
> EXANT_CHICKEN, so just write
>
> IF(EXTANT_CHICKEN)
>   # have it
> ELSE(EXTANT_CHICKEN)
>   # don't have it
> ENDIF(EXTANT_CHICKEN)
Ok good to know.  I also discovered the STRING(COMPARE EQUAL str1 str2 
OUTPUT_VARIABLE) functions, which handle a lot of cases.


Cheers,
Brandon Van Every



More information about the CMake mailing list