[CMake] Simple truth question
E. Wing
ewmailing at gmail.com
Wed Apr 11 22:48:49 EDT 2007
Okay, here's a silly question. Why doesn't this work as I think it should?
SET(IS_TRUE TRUE)
IF(${IS_TRUE})
MESSAGE("IS_TRUE Is true")
ELSE(${IS_TRUE})
MESSAGE("IS_TRUE Is false")
ENDIF(${IS_TRUE})
I get "IS_TRUE Is false" when I run this.
The same thing for SET(IS_TRUE YES) and SET(IS_TRUE ON)
The documentation says
IF(variable)
True if the variable's value is not empty, 0, N, NO, OFF, FALSE,
NOTFOUND, or <variable>-NOTFOUND
I'm wondering why the inverse isn't true for YES, ON, TRUE.
Thanks,
Eric
More information about the CMake
mailing list