summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-10 14:10:58 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-05-10 14:11:04 (GMT)
commit3dd38ac36d49c4eea319b9813bbd1f66a7b0fb29 (patch)
treeb5113f2c0286b0aa268a7f0a9f7291b63297b1e3 /Tests
parent74d35f569316fcd09e1604ac87e53bfb16367a8d (diff)
parentd71a7cc19d6e03f89581efdaa8d63db216184d40 (diff)
downloadCMake-3dd38ac36d49c4eea319b9813bbd1f66a7b0fb29.zip
CMake-3dd38ac36d49c4eea319b9813bbd1f66a7b0fb29.tar.gz
CMake-3dd38ac36d49c4eea319b9813bbd1f66a7b0fb29.tar.bz2
Merge topic 'install-symlink-to-directory'
d71a7cc19d install(FILES): Allow installation of symlinks to directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6098
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/install/FILES-directory-result.txt1
-rw-r--r--Tests/RunCMake/install/FILES-directory-stderr.txt1
-rw-r--r--Tests/RunCMake/install/FILES-directory.cmake7
-rw-r--r--Tests/RunCMake/install/FILES-symlink-to-directory.cmake9
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake4
5 files changed, 22 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/FILES-directory-result.txt b/Tests/RunCMake/install/FILES-directory-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-directory-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/FILES-directory-stderr.txt b/Tests/RunCMake/install/FILES-directory-stderr.txt
new file mode 100644
index 0000000..4699037
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-directory-stderr.txt
@@ -0,0 +1 @@
+install FILES given directory
diff --git a/Tests/RunCMake/install/FILES-directory.cmake b/Tests/RunCMake/install/FILES-directory.cmake
new file mode 100644
index 0000000..1199cf7
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-directory.cmake
@@ -0,0 +1,7 @@
+set(dst "${CMAKE_CURRENT_BINARY_DIR}/dst")
+set(src "${CMAKE_CURRENT_BINARY_DIR}/src")
+
+file(MAKE_DIRECTORY "${dst}")
+file(MAKE_DIRECTORY "${src}")
+
+install(FILES "${src}" DESTINATION "${dst}")
diff --git a/Tests/RunCMake/install/FILES-symlink-to-directory.cmake b/Tests/RunCMake/install/FILES-symlink-to-directory.cmake
new file mode 100644
index 0000000..ed76470
--- /dev/null
+++ b/Tests/RunCMake/install/FILES-symlink-to-directory.cmake
@@ -0,0 +1,9 @@
+set(dst "${CMAKE_CURRENT_BINARY_DIR}/dst")
+set(src "${CMAKE_CURRENT_BINARY_DIR}/src")
+set(lnk "${CMAKE_CURRENT_BINARY_DIR}/lnk")
+
+file(MAKE_DIRECTORY "${dst}")
+file(MAKE_DIRECTORY "${src}")
+file(CREATE_LINK "${src}" "${lnk}" SYMBOLIC)
+
+install(FILES "${lnk}" DESTINATION "${dst}")
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index efd03df..6fb72fc 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -93,6 +93,10 @@ run_cmake(TARGETS-NAMELINK_COMPONENT-bad-all)
run_cmake(TARGETS-NAMELINK_COMPONENT-bad-exc)
run_cmake(FILES-DESTINATION-TYPE)
run_cmake(DIRECTORY-DESTINATION-TYPE)
+run_cmake(FILES-directory)
+if(NOT WIN32)
+ run_cmake(FILES-symlink-to-directory)
+endif()
set(RunCMake_TEST_OPTIONS "-DCMAKE_BUILD_TYPE:STRING=Debug")
run_install_test(FILES-RENAME)