[CMake] IF how?

klaas.holwerda ngi at klaasholwerda.nl
Mon Feb 19 16:59:05 EST 2007


Hi,

Cmake 2.4 patch 5

I am getting different behaviour on Linux compared to windows. From the 
docs i understand that the next should end up with the message "fine".
Is that true? I get the else answer??

SET( myvar 0 )
IF( myvar EQUAL 0 )
     MESSAGE( "fine" )
ELSE( myvar EQUAL 0 )
     MESSAGE( "fine" )
ENDIF( myvar EQUAL 0 )

For me only works:
IF( ${myvar} STREQUAL "0" )
etc.

Thanks,

Klaas





More information about the CMake mailing list