summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/file/CREATE_LINK.cmake
blob: ca616468a3bbea191bee2272d6f274efa3a6200c (plain)
1
2
3
4
5
6
7
8
9
10
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()