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

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.

Nils

On 10/05/2012 07:34 PM, Brad King wrote:
On 09/29/2012 05:47 AM, Nils Gladitz wrote:
I've updated the patch (attached) to include a "TIMESTAMP" sub-command
for "file" as well (I hope indentation is also fixed).
Thanks.

Use of std::time_t and std::tm will not compile on all of CMake's platforms.
Other code already uses "#include <time.h>", "time_t", and "struct tm".

Also, IMO the result in the case of failure should be the empty string
rather than NOTFOUND.  The latter is a convention in the find_* commands
that should never have been used elsewhere.

Thanks,
-Brad


--
Nils Gladitz, B.Sc.
DICOM, Konnektivität und Entwicklung

Scivis wissenschaftliche Bildverarbeitung GmbH
Bertha-von-Suttner-Str. 5
D-37085 Göttingen
GERMANY
Handelsregister Nr. / Trade Register No. B3100 Göttingen
Geschäftsführer / Managing Directors Dr. Gernot Ebel, Dr. Uwe Engeland

Tel: 0049 (0)551 634181-28
E-Mail: glad...@scivis.de
Web: www.scivis.de

--

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