diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:21 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:21 +0900 |
commit | 990f644abd85c36c7bfec6c18255af2683475363 (patch) | |
tree | 72eefb394835489ac11c8b48a35223c06cf75032 /Source | |
parent | c5f1ff3b8bce56839eb20ff7bd17cbcd3af13a29 (diff) | |
download | cmake-990f644abd85c36c7bfec6c18255af2683475363.tar.gz cmake-990f644abd85c36c7bfec6c18255af2683475363.tar.bz2 cmake-990f644abd85c36c7bfec6c18255af2683475363.zip |
Imported Upstream version 3.11.3upstream/3.11.3
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmSystemTools.cxx | 10 | ||||
-rw-r--r-- | Source/cmSystemTools.h | 10 | ||||
-rw-r--r-- | Source/cmTimestamp.cxx | 3 |
5 files changed, 18 insertions, 11 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index a0010a292..61327be7d 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -949,8 +949,8 @@ if(CYGWIN) endif() if(WIN32 OR (CYGWIN AND LibUUID_FOUND)) set(CPACK_SRCS ${CPACK_SRCS} - CPack/Wix/cmCMakeToWixPath.cxx - CPack/Wix/cmCMakeToWixPath.h + CPack/WiX/cmCMakeToWixPath.cxx + CPack/WiX/cmCMakeToWixPath.h CPack/WiX/cmCPackWIXGenerator.cxx CPack/WiX/cmCPackWIXGenerator.h CPack/WiX/cmWIXAccessControlList.cxx diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 260070680..354d0b5f3 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 11) -set(CMake_VERSION_PATCH 2) +set(CMake_VERSION_PATCH 3) #set(CMake_VERSION_RC 0) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index eeb73c3ee..6f326de51 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -949,10 +949,12 @@ cmSystemTools::WindowsFileRetry cmSystemTools::GetWindowsFileRetry() } return retry; } +#endif -std::string cmSystemTools::GetRealPath(const std::string& path, - std::string* errorMessage) +std::string cmSystemTools::GetRealPathResolvingWindowsSubst( + const std::string& path, std::string* errorMessage) { +#ifdef _WIN32 // uv_fs_realpath uses Windows Vista API so fallback to kwsys if not found std::string resolved_path; uv_fs_t req; @@ -981,8 +983,10 @@ std::string cmSystemTools::GetRealPath(const std::string& path, resolved_path = path; } return resolved_path; -} +#else + return cmsys::SystemTools::GetRealPath(path, errorMessage); #endif +} void cmSystemTools::InitializeLibUV() { diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index a53afded7..4390c863e 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -500,12 +500,14 @@ public: unsigned int Delay; }; static WindowsFileRetry GetWindowsFileRetry(); - - /** Get the real path for a given path, removing all symlinks. */ - static std::string GetRealPath(const std::string& path, - std::string* errorMessage = 0); #endif + /** Get the real path for a given path, removing all symlinks. + This variant of GetRealPath also works on Windows but will + resolve subst drives too. */ + static std::string GetRealPathResolvingWindowsSubst( + const std::string& path, std::string* errorMessage = nullptr); + /** Perform one-time initialization of libuv. */ static void InitializeLibUV(); diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx index f1e92839d..14cf6e964 100644 --- a/Source/cmTimestamp.cxx +++ b/Source/cmTimestamp.cxx @@ -33,7 +33,8 @@ std::string cmTimestamp::FileModificationTime(const char* path, const std::string& formatString, bool utcFlag) { - std::string real_path = cmSystemTools::GetRealPath(path); + std::string real_path = + cmSystemTools::GetRealPathResolvingWindowsSubst(path); if (!cmsys::SystemTools::FileExists(real_path)) { return std::string(); |