summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake
diff options
context:
space:
mode:
authorJon Chronopoulos <patches@crondog.com>2018-06-11 07:28:09 (GMT)
committerBrad King <brad.king@kitware.com>2018-09-18 15:24:08 (GMT)
commitafb7f6e4ff8a0c1a68c8d8cf2d6cf72401cfb8ff (patch)
treef79c1b7cf4d0e408d3e0b98b06503b2e1cc7e5f8 /Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake
parent49cb2a504d1e00e51774a23bf1b91c982fa69e5d (diff)
downloadCMake-afb7f6e4ff8a0c1a68c8d8cf2d6cf72401cfb8ff.zip
CMake-afb7f6e4ff8a0c1a68c8d8cf2d6cf72401cfb8ff.tar.gz
CMake-afb7f6e4ff8a0c1a68c8d8cf2d6cf72401cfb8ff.tar.bz2
cmake: Add '-E create_symlink' support on Windows
The allows `-E create_symlink` to work on Windows. It utilizes `uv_fs_symlink`. I am still unsure exactly which Windows platforms will work without requiring Administrator privileges or needing a user/group with the "Create Symbolic Links" User Rights. It does work with my Windows 10 Pro with Developer Mode turned on. In the test suite check that the symlink either worked or failed with a permissions error. Use recent changes in cmSystemTools::FileExists to check that a symlink is broken.
Diffstat (limited to 'Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake')
-rw-r--r--Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake14
1 files changed, 9 insertions, 5 deletions
diff --git a/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake b/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake
index d7e652d..5df5f2f 100644
--- a/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake
+++ b/Tests/RunCMake/CommandLine/E_create_symlink-broken-create-check.cmake
@@ -1,6 +1,10 @@
-if(NOT IS_SYMLINK ${RunCMake_TEST_BINARY_DIR}/L)
- set(RunCMake_TEST_FAILED "Symlink 'L' incorrectly not created!")
-endif()
-if(EXISTS ${RunCMake_TEST_BINARY_DIR}/L)
- set(RunCMake_TEST_FAILED "Symlink 'L' not broken!")
+if(${actual_stderr_var} MATCHES "operation not permitted")
+ unset(msg)
+else()
+ if(NOT IS_SYMLINK ${RunCMake_TEST_BINARY_DIR}/L)
+ set(RunCMake_TEST_FAILED "Symlink 'L' incorrectly not created!")
+ endif()
+ if(EXISTS ${RunCMake_TEST_BINARY_DIR}/L)
+ set(RunCMake_TEST_FAILED "Symlink 'L' not broken!")
+ endif()
endif()