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)