summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:13:21 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:13:21 +0900
commit990f644abd85c36c7bfec6c18255af2683475363 (patch)
tree72eefb394835489ac11c8b48a35223c06cf75032
parentc5f1ff3b8bce56839eb20ff7bd17cbcd3af13a29 (diff)
downloadcmake-990f644abd85c36c7bfec6c18255af2683475363.tar.gz
cmake-990f644abd85c36c7bfec6c18255af2683475363.tar.bz2
cmake-990f644abd85c36c7bfec6c18255af2683475363.zip
Imported Upstream version 3.11.3upstream/3.11.3
-rw-r--r--Help/release/3.11.rst7
-rw-r--r--Source/CMakeLists.txt4
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmSystemTools.cxx10
-rw-r--r--Source/cmSystemTools.h10
-rw-r--r--Source/cmTimestamp.cxx3
-rw-r--r--Templates/TestDriver.cxx.in2
7 files changed, 26 insertions, 12 deletions
diff --git a/Help/release/3.11.rst b/Help/release/3.11.rst
index 971b3e2ba..214da0dba 100644
--- a/Help/release/3.11.rst
+++ b/Help/release/3.11.rst
@@ -298,3 +298,10 @@ Changes made since CMake 3.11.0 include the following.
:prop_sf:`SKIP_AUTOUIC` on their generated files. These files never
need to be processed by moc or uic, and we must say so explicitly to
account for policy :policy:`CMP0071`.
+
+3.11.3
+------
+
+* CMake 3.11.0 introduced support for resolving symbolic links on
+ Windows in code paths that typically do so on UNIX. This has been
+ reverted due to breakage on ``subst`` drives.
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();
diff --git a/Templates/TestDriver.cxx.in b/Templates/TestDriver.cxx.in
index ff3c869e5..ac531c051 100644
--- a/Templates/TestDriver.cxx.in
+++ b/Templates/TestDriver.cxx.in
@@ -48,7 +48,7 @@ static char* lowercase(const char* string)
if (new_string == NULL) { /* NOLINT */
return NULL; /* NOLINT */
}
- strncpy(new_string, string, stringSize);
+ strcpy(new_string, string);
for (p = new_string; *p != 0; ++p) {
*p = CM_CAST(char, tolower(*p));
}