diff options
Diffstat (limited to 'Tests/RunCMake/file/CREATE_LINK.cmake')
-rw-r--r-- | Tests/RunCMake/file/CREATE_LINK.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Tests/RunCMake/file/CREATE_LINK.cmake b/Tests/RunCMake/file/CREATE_LINK.cmake index b7c090e..ca61646 100644 --- a/Tests/RunCMake/file/CREATE_LINK.cmake +++ b/Tests/RunCMake/file/CREATE_LINK.cmake @@ -1,4 +1,11 @@ -file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestLink.cmake RESULT result) +# 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() |