On 10/05/2012 02:53 PM, Nils Gladitz wrote:
> My initial thought was that "NOTFOUND" would be a good idea since it 
> evaluates to false and the get_*_property commands also seem to use it.

I wrote the more general "get_property" command to replace those and
the newer command uses empty string rather than NOTFOUND.  It is more
useful when computing pieces of a string to put together, perhaps when
appending to a property value.

> Looking at the documentation for "if()" again only "-NOTFOUND" as a 
> suffix should evaluate to false though (I assume the documentation is 
> incomplete here?).

Yes, thanks for pointing it out.  Fixed:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f63304d9

> On second though relying on timestamps to evaluate to false on failure 
> is probably a bad idea since I could have a format string of e.g. "%w" 
> (day of the week) which might produce a valid timestamp "0" which would 
> also evaluate to false.

Yes, so a comparison against "" would be more reliable.

Thanks,
-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to