
In commit 7f89053953
(cmSystemTools: Return KWSys Status from CreateLink
and CreateSymlink, 2021-04-15) we just took the `-err` from libuv and
treated it as a POSIX error. This is accurate on POSIX, but on Windows
does not match the POSIX error codes.
Use `uv_fs_get_system_error` to get the actual system error code.
This requires libuv 1.38 or higher. Require that for Windows, but
fall back to the previous approach on POSIX.
11 lines
349 B
CMake
11 lines
349 B
CMake
if(${actual_stderr_var} MATCHES "A required privilege is not held by the client")
|
|
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()
|