mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-20 12:53:55 +08:00
ExternalData: use file(COPY_FILE)
instead of forking CMake
This commit is contained in:
@@ -944,7 +944,7 @@ function(_ExternalData_link_or_copy src dst)
|
|||||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${tgt}" "${tmp}" RESULT_VARIABLE result)
|
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${tgt}" "${tmp}" RESULT_VARIABLE result)
|
||||||
else()
|
else()
|
||||||
# Create a copy.
|
# Create a copy.
|
||||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${src}" "${tmp}" RESULT_VARIABLE result)
|
file(COPY_FILE "${src}" "${tmp}" RESULT result)
|
||||||
endif()
|
endif()
|
||||||
if(result)
|
if(result)
|
||||||
file(REMOVE "${tmp}")
|
file(REMOVE "${tmp}")
|
||||||
|
Reference in New Issue
Block a user