CMake/Tests/RunCMake/file/LOCK-error-lock-fail.cmake

7 lines
225 B
CMake

set(lfile "${CMAKE_CURRENT_BINARY_DIR}/file-to-lock")
FILE(WRITE "${lfile}" "")
# Try to lock file '${lfile}/cmake.lock'. Since `lfile` is not a directory
# expected that operation will fail.
file(LOCK "${lfile}" DIRECTORY)