summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-01-21 13:51:39 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-01-21 13:51:39 (GMT)
commita86865e96c55c8a35615c24af0cf1c990f4bba68 (patch)
treed098ac097f26409ec2e3719c793449dbba3b74e6 /Tests/RunCMake/CommandLine/RunCMakeTest.cmake
parentce906497c011cf860e0aee2a1f9a4f1d4edc5397 (diff)
parente0228e2b04b3d6bf72304038c8621fc5072e7f4e (diff)
downloadCMake-a86865e96c55c8a35615c24af0cf1c990f4bba68.zip
CMake-a86865e96c55c8a35615c24af0cf1c990f4bba68.tar.gz
CMake-a86865e96c55c8a35615c24af0cf1c990f4bba68.tar.bz2
Merge topic 'cmake-E-symlink-replace-dangling'
e0228e2b cmake: Improve '-E create_symlink' edge case handling (#14713)
Diffstat (limited to 'Tests/RunCMake/CommandLine/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake25
1 files changed, 25 insertions, 0 deletions
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
new file mode 100644
index 0000000..ee6cd99
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -0,0 +1,25 @@
+include(RunCMake)
+
+if(UNIX)
+ run_cmake_command(E_create_symlink-missing-dir
+ ${CMAKE_COMMAND} -E create_symlink T missing-dir/L
+ )
+
+ # Use a single build tree for a few tests without cleaning.
+ set(RunCMake_TEST_BINARY_DIR
+ ${RunCMake_BINARY_DIR}/E_create_symlink-broken-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ run_cmake_command(E_create_symlink-broken-create
+ ${CMAKE_COMMAND} -E create_symlink T L
+ )
+ run_cmake_command(E_create_symlink-broken-replace
+ ${CMAKE_COMMAND} -E create_symlink . L
+ )
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+
+ run_cmake_command(E_create_symlink-no-replace-dir
+ ${CMAKE_COMMAND} -E create_symlink T .
+ )
+endif()