1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-18 17:31:57 +08:00

ExternalData: use file(COPY_FILE) instead of forking CMake

This commit is contained in:
Ben Boeckel
2021-03-02 15:05:32 -05:00
parent 2da1a8f92d
commit 01cc8bf930

View File

@@ -944,7 +944,7 @@ function(_ExternalData_link_or_copy src dst)
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${tgt}" "${tmp}" RESULT_VARIABLE result)
else()
# Create a copy.
execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${src}" "${tmp}" RESULT_VARIABLE result)
file(COPY_FILE "${src}" "${tmp}" RESULT result)
endif()
if(result)
file(REMOVE "${tmp}")