[CMake] Bug in CMake documentation?

Hendrik Sattler post at hendrik-sattler.de
Sun May 9 05:56:23 EDT 2010


Am Sonntag 09 Mai 2010, 11:12:54 schrieb Esben Mose Hansen:
> Hi,
> 
> 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?

Almost. The original statement above doesn't say anything about other values 
than the mentioned ones. You probably missed:
         if(<variable>)

       True if the variable's value is not a false constant.

HS


More information about the CMake mailing list