I wouldn't mind if this were a string subcommand.
Initially I wanted something like this to tag package filenames.
What gave me another push is this CMake test:
http://open.cdash.org/testDetails.php?test=160586053&build=2583145
It seems to fail on my system because it relies on the US locale
formatting of %DATE% and %TIME% (my test system has a german locale).
There are also these older mailing list posts asking for something similar:
http://www.cmake.org/pipermail/cmake/2009-March/027915.html
http://www.cmake.org/pipermail/cmake/2010-November/041030.html
It would be really cool to have fractions of seconds too but I'm not
sure how to portably implement those.
Nils
On 09/27/2012 02:37 PM, David Cole wrote:
Hmmmm. Good idea.
Should we add a new command for this? Or should it be a sub-command of
"string(" like RANDOM is?
And... while we're at it, I've always thought we should add the
ability to get the creation/modified/access times from a file via the
CMake file command. If we allow getting the "current" time, we should
leverage some of the same transformation-to-string code in the file
command to get the various times associated with a file.
What do other devs here think:
New command or string sub-command for this functionality?
Thanks,
David
On Thu, Sep 27, 2012 at 7:25 AM, Nils Gladitz <glad...@sci-vis.de> wrote:
I've tried creating a patch (attached; should apply to master) that adds a
timestamp creation command.
It builds on strftime but only allows a limited number of conversion
specifiers.
I tried to only allow those which are portable (C89), locale independent and
of fixed range and length (with the exception of "%Y").
Nils
--
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
--
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