diff options
Diffstat (limited to 'Modules/ExternalData.cmake')
-rw-r--r-- | Modules/ExternalData.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake index 032e423..1850e74 100644 --- a/Modules/ExternalData.cmake +++ b/Modules/ExternalData.cmake @@ -941,7 +941,8 @@ function(_ExternalData_link_or_copy src dst) file(RELATIVE_PATH tgt "${dst_dir}" "${src}") endif() endif() - execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${tgt}" "${tmp}" RESULT_VARIABLE result) + # Create link (falling back to copying if there's a problem). + file(CREATE_LINK "${tgt}" "${tmp}" RESULT result COPY_ON_ERROR SYMBOLIC) else() # Create a copy. file(COPY_FILE "${src}" "${tmp}" RESULT result) |