[cmake-developers] Fwd: Bug#699657: cmake: cmake -E touch truncates time
Eric Noulard
eric.noulard at gmail.com
Mon Feb 4 09:53:18 EST 2013
2013/2/4 Brad King <brad.king at kitware.com>:
> On 02/04/2013 08:52 AM, Bill Hoffman wrote:
>> # Touch the two files again
>> $ touch file1 ; cmake -E touch file2 ; ls -l --full-time
>> -rw-r----- 1 xxxx xxxx 0 2013-02-03 02:01:01.595819478 +0100 file1
>> -rw-r----- 1 xxxx xxxx 0 2013-02-03 02:01:01.000000000 +0100 file2
>
> You introduced this here:
>
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5050706a
>
> From "man utime":
>
> The utime() system call allows specification of timestamps with a resolution of 1 second
On Linux one can use
utimensat(2) or futimens(2)
in order to have nanosec resolution.
I don't know since when it is supported and I don't know for other Unices.
Those functions are claimed to be in POSIX.1-2008.
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
More information about the cmake-developers
mailing list