IF("WHATEVER") MESSAGE("WHATEVER string is true") ELSE("WHATEVER") MESSAGE("WHATEVER string is false") ENDIF("WHATEVER")
C:\devel\src\cbugs\trueorfalse>cmake -P trueorfalse.cmake WHATEVER string is false I would expect the literal string "WHATEVER" to evaluate to true. By analogy to IF(variable) as per the docs. The practical application is I'm trying to sanity check an argument that's a literal string. MACRO(DOSOMETHING literal_string result) IF(${literal_string}) SET(result "valid") ELSE(${literal_string}) MESSAGE(SEND_ERROR "I don't like the input!") ENDIF(${literal_string}) ENDMACRO(DOSOMETHING) DOSOMETHING("WHATEVER" out) C:\devel\src\cbugs\trueorfalse>cmake -P trueorfalse.cmake CMake Error: I don't like the input! Cheers, Brandon Van Every _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake