diff options
author | Brad King <brad.king@kitware.com> | 2022-10-06 16:48:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-06 19:08:06 (GMT) |
commit | 85f01a1ec2203187d4cd99c74136774059b89b35 (patch) | |
tree | d7089498349f0b70c66f6ca5ce2b7c0f504ee850 /Tests/RunCMake/install/DIRECTORY-symlink-clobber.cmake | |
parent | aba48bd6acbf564dcb5b831b26cc01743b5b5f71 (diff) | |
download | CMake-85f01a1ec2203187d4cd99c74136774059b89b35.zip CMake-85f01a1ec2203187d4cd99c74136774059b89b35.tar.gz CMake-85f01a1ec2203187d4cd99c74136774059b89b35.tar.bz2 |
file(INSTALL): Improve formatting of symlink creation error
Avoid printing two error messages. Format paths without wrapping.
Diffstat (limited to 'Tests/RunCMake/install/DIRECTORY-symlink-clobber.cmake')
-rw-r--r-- | Tests/RunCMake/install/DIRECTORY-symlink-clobber.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/DIRECTORY-symlink-clobber.cmake b/Tests/RunCMake/install/DIRECTORY-symlink-clobber.cmake new file mode 100644 index 0000000..ac7a2cf --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-symlink-clobber.cmake @@ -0,0 +1,11 @@ +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/old/dir) +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/old/dir/file "") +file(CREATE_LINK dir ${CMAKE_CURRENT_BINARY_DIR}/old/lnk SYMBOLIC) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/old/dir DESTINATION dest) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/old/lnk DESTINATION dest) + +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/new/lnk) +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/new/lnk/file "") +file(CREATE_LINK lnk ${CMAKE_CURRENT_BINARY_DIR}/new/dir SYMBOLIC) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/new/lnk DESTINATION dest) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/new/dir DESTINATION dest) |