summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/file/CREATE_LINK.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/file/CREATE_LINK.cmake')
-rw-r--r--Tests/RunCMake/file/CREATE_LINK.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/file/CREATE_LINK.cmake b/Tests/RunCMake/file/CREATE_LINK.cmake
new file mode 100644
index 0000000..ca61646
--- /dev/null
+++ b/Tests/RunCMake/file/CREATE_LINK.cmake
@@ -0,0 +1,11 @@
+# start with a file in the same directory to avoid cross-device links
+set(test_file ${CMAKE_CURRENT_BINARY_DIR}/CreateLinkTest.txt)
+file(TOUCH ${test_file})
+
+file(CREATE_LINK
+ ${test_file} ${CMAKE_CURRENT_BINARY_DIR}/TestCreateLink.txt
+ RESULT result
+ )
+if(NOT result STREQUAL "0")
+ message(SEND_ERROR "Hard link result='${result}'")
+endif()