[cmake-developers] Time truncation bug in cmake -E touch

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu May 30 15:54:49 EDT 2013


On 2013-05-30 08:28-0400 Brad King wrote:

> On 05/30/2013 08:26 AM, Alan W. Irwin wrote:
>> To illustrate the problem on Linux:
>>
>> wine at raven> touch test1; cmake -E touch test2; touch test3
>> wine at raven> ls -lrt --time-style=full-iso test[123]
>> -rw-r--r-- 1 wine wine 0 2013-05-30 04:18:25.000000000 -0700 test2
>> -rw-r--r-- 1 wine wine 0 2013-05-30 04:18:25.761281846 -0700 test1
>> -rw-r--r-- 1 wine wine 0 2013-05-30 04:18:25.765281683 -0700 test3
>>
>> Note the time on test2 generated by cmake -E touch has been truncated to the nearest second so
>> it is not in the correct time order compared to test1 and test3.
>> I checked that both CMake-2.8.10.2 and CMake-2.8.0 had this issue
>> so it appears this is a bug that has been around for a while.
>
> http://www.cmake.org/Bug/view.php?id=14020

Thanks for that link to an existing bug report on this issue.

I have put further notes there concerning using utimes (microsecond time
resolution which is still much better than the 1-second time resolution of
utime) to the mix when utimensat (nanosecond time resolution) is not
available.

Because this bug causes obvious file dependency issues for
ExternalProject_Add, I hope you are able to soon give this bug high
priority priority again rather than leaving it in its current state
(bugfix almost finished but backlogged).

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________



More information about the cmake-developers mailing list