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
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to