[CMake] Unexpected behavior testing boolean expressions
Brandon Van Every
bvanevery at gmail.com
Thu Jan 31 04:17:35 EST 2008
On Jan 30, 2008 9:53 PM, Alan W. Irwin <irwin at beluga.phys.uvic.ca> wrote:
> My guess is YES, etc., are being interpreted
> as (undefined) variable names
Yep, that's exactly what's happening. The macro expands to things
like if(YES) and the variable YES has not been defined. A month or so
ago I made a feature request to define TRUE and FALSE as constants.
http://www.cmake.org/Bug/view.php?id=5835 I've now made a note that
perhaps YES, NO, ON, and OFF should be defined as constants as well.
I don't believe Y and N should be defined as constants. Frankly I
think they should be removed as true/false values.
Cheers,
Brandon Van Every
More information about the CMake
mailing list