diff options
author | Brad King <brad.king@kitware.com> | 2021-05-06 10:39:05 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-07 08:30:52 -0400 |
commit | d7522b8f864db8df25b99eeabc625e55ad690a3e (patch) | |
tree | 6f9bc3bcbc373f103696c8c20565b45d7c6a45cf /CMakeLists.txt | |
parent | e0b4a22ca6874a15912eea86cde16f47cb5f9d93 (diff) | |
download | cmake-d7522b8f864db8df25b99eeabc625e55ad690a3e.tar.gz |
cmSystemTools: Improve CreateLink and CreateSymlink error codes
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f03c39cbf..44b433ac8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -644,7 +644,11 @@ macro (CMAKE_BUILD_UTILITIES) #--------------------------------------------------------------------- # Build libuv library. if(CMAKE_USE_SYSTEM_LIBUV) - find_package(LibUV 1.10.0) + if(WIN32) + find_package(LibUV 1.38.0) + else() + find_package(LibUV 1.10.0) + endif() if(NOT LIBUV_FOUND) message(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!") |