SystemTools: add a clonefile optimization on macOS
Implement the copy file optimization on Darwin for copy_file
and
copy_file_if_different
. Use the copyfile
API on macOS 10.5 or
newer to copy the file using APFS clone semantics. This is a best
effort operation, but will fallback to copying without the cloning
if necessary. The operation has been available since 10.5, making
it old enough to assume present as the OS has been EOLed for years
now.
Ported from cmake/cmake!7325 (closed).
Author: @compnerd
Merge request reports
Activity
assigned to @brad.king
mentioned in merge request cmake/cmake!7325 (closed)
- Resolved by Brad King
This causes a test failure in CMake, as discussed in cmake/cmake!7325 (comment 1197452). I'll close this MR while we work this out in CMake before bringing the change upstream here.
added 1 commit
- ce02ac1e - SystemTools: add a clonefile optimization on macOS
- Resolved by Brad King
added 1 commit
- 0969597d - SystemTools: add a clonefile optimization on macOS
mentioned in commit 9b65e88d
mentioned in merge request cmake/cmake!7345 (merged)
mentioned in issue cmake/cmake#24577 (closed)
mentioned in merge request !281 (merged)
mentioned in merge request !303 (merged)