summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file/INSTALL-SYMLINK.cmake
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2017-03-28 22:22:52 (GMT)
committerDomen Vrankar <domen.vrankar@gmail.com>2017-03-28 22:22:52 (GMT)
commit8e8f1118b947905e0e881ea3d9cc881f5fdce89d (patch)
tree8e5bbf4fe087a2a5b4e31d508c1bdae5e95185df /Tests/RunCMake/file/INSTALL-SYMLINK.cmake
parentcc4fbda1a9fffd8927de870643f167f066b26bcd (diff)
downloadCMake-8e8f1118b947905e0e881ea3d9cc881f5fdce89d.zip
CMake-8e8f1118b947905e0e881ea3d9cc881f5fdce89d.tar.gz
CMake-8e8f1118b947905e0e881ea3d9cc881f5fdce89d.tar.bz2
handle non-existing symlink creation locations
Diffstat (limited to 'Tests/RunCMake/file/INSTALL-SYMLINK.cmake')
-rw-r--r--Tests/RunCMake/file/INSTALL-SYMLINK.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/file/INSTALL-SYMLINK.cmake b/Tests/RunCMake/file/INSTALL-SYMLINK.cmake
new file mode 100644
index 0000000..5a4284a
--- /dev/null
+++ b/Tests/RunCMake/file/INSTALL-SYMLINK.cmake
@@ -0,0 +1,13 @@
+set(src "${CMAKE_CURRENT_BINARY_DIR}/src")
+set(dst "${CMAKE_CURRENT_BINARY_DIR}/dst")
+file(REMOVE RECURSE "${src}")
+file(REMOVE RECURSE "${dst}")
+
+file(MAKE_DIRECTORY "${src}")
+execute_process(COMMAND
+ ${CMAKE_COMMAND} -E create_symlink source "${src}/current_dir_symlink")
+
+message(STATUS "Before Installing")
+file(INSTALL FILES "${src}/current_dir_symlink"
+ DESTINATION ${dst} TYPE DIRECTORY)
+message(STATUS "After Installing")