[cmake-developers] re-install timestamp comparison (was: OS X: Filesystem timestamp checks use only 1s resolution)
Brad King
brad.king at kitware.com
Mon Oct 12 15:40:12 EDT 2015
On 10/09/2015 07:02 PM, Ruslan Baratov wrote:
> On 10-Oct-15 01:00, Ruslan Baratov via cmake-developers wrote:
>> cmFileTimeComparisonInternal::TimesDiffer use only limited number of
>> digits of timestamp and used in install step.
>>
> And the main difference is that it affects Linux platform too
IIRC that is done for the case that one installs from one
filesystem to another and they each have different timestamp
resolution. If we don't round the times then they may always
differ and inefficiently re-install everything every time.
Ideally we would detect the resolution available on each
filesystem and truncate only to the lower resolution of the
two. Perhaps one could at least detect when the source and
destination are on the same filesystem and do no truncation.
Another approach would be to try writing the destination
file time to see if it changes. If so then re-install
and set the time again. This would happen only when really
on filesystems with different time resolutions because
otherwise the file times would match. This way a failure
to re-install would occur only on a truly 1s filesystem.
-Brad
More information about the cmake-developers
mailing list