Skip to content

File copy/install permissions code modifying timestamps

Robert Dailey requested to merge rcdailey/cmake:master into master

When invoking file(COPY) or file(INSTALL), the flow is:

Copy File -> Modify Timestamps -> Set Permissions

Now the flow is:

Copy File -> Set Permissions -> Modify Timestamps

Setting permissions after modifying the timestamps causes the timestamps to be modified again, resulting in the timestamps being set to the current clock time instead of the timestamp of the source file of the copy.

Additionally, none of the above 3 operations are performed if the two file timestamps (source & destination) are the same.

Fixes #17087 (closed)

Topic-rename: update-permissions-before-updating-timestamps

Edited by Ben Boeckel

Merge request reports