[CMake] Bug in CMake documentation?

Michael Hertling mhertling at online.de
Sun May 9 14:56:06 EDT 2010


On 05/09/2010 12:01 PM, Esben Mose Hansen wrote:
> On Sunday 09 May 2010 11:12:54 Esben Mose Hansen wrote:
>> I quote from the documentation (2.8)
>>
>>>   if(<constant>)
>>>
>>>
>>> True if the constant is 1, ON, YES, TRUE, Y, or a non-zero number. False
>>> if the constant is 0, OFF, NO, FALSE, N, IGNORE, "", or ends in the
>>> suffix '-NOTFOUND'. Named boolean constants are case-insensitive.
>>
>> So what is the value of say "/home/esben/kde/lib/mylibrary.so"?
>> Experimental  test and common sense say true, but the documentation
>> doesn't say so. Wouldn't the correct documentation be
>>
>>   if(<constant>)
>> False if the constant is 0, OFF, NO, FALSE, N, IGNORE, "", or ends in the 
>> suffix '-NOTFOUND'. Named boolean constants are case-insensitive. IF the 
>> constant has any other value, it is true.
>>
>> Right?
> 
> Wrong. I made some experiments, and as far as I have been able to determine, 
> anything not on the true list (1 being there twice?!) is actually false, 



More information about the CMake mailing list