[Cmake-commits] CMake branch, master, updated. v3.11.2-868-gf5ca585

Kitware Robot kwrobot at kitware.com
Thu May 31 08:55:06 EDT 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  f5ca5850df6846347b2cfa4ffb1a3f3bac2caf46 (commit)
       via  d155b536cb2c391c883b1c84519e48a74fe1c97a (commit)
       via  61c4858c3741da533d100eb0cbbebfd9fc720d20 (commit)
       via  3af0438b4bccc599792f61a9f4be81b4bb36c3e3 (commit)
       via  ca49f1a8e4cce294b2c4c10e80418b736986c2dd (commit)
       via  83630d491888705dc650f2ae62de9943181b50df (commit)
      from  0b32ae944fe058883c65532b353a709980eabe6d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5ca5850df6846347b2cfa4ffb1a3f3bac2caf46
commit f5ca5850df6846347b2cfa4ffb1a3f3bac2caf46
Merge: d155b53 3af0438
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 31 12:47:30 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 31 08:51:05 2018 -0400

    Merge topic 'create_test_sourcelist-strcpy'
    
    3af0438b4b TestDriver: Replace strncpy with strcpy
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2115


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d155b536cb2c391c883b1c84519e48a74fe1c97a
commit d155b536cb2c391c883b1c84519e48a74fe1c97a
Merge: 61c4858 ca49f1a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 31 12:47:47 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 31 08:50:15 2018 -0400

    Merge topic 'cpack-wix-sources'
    
    ca49f1a8e4 CPack: Fix cross-compilation of WiX generator
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2116


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61c4858c3741da533d100eb0cbbebfd9fc720d20
commit 61c4858c3741da533d100eb0cbbebfd9fc720d20
Merge: 0b32ae9 83630d4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 31 12:47:11 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 31 08:48:36 2018 -0400

    Merge topic 'revert-windows_symlinks'
    
    83630d4918 cmSystemTools: Revert GetRealPath implementation on Windows
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2114


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3af0438b4bccc599792f61a9f4be81b4bb36c3e3
commit 3af0438b4bccc599792f61a9f4be81b4bb36c3e3
Author:     Sander Vrijders <sander.vrijders at ugent.be>
AuthorDate: Wed May 30 09:39:28 2018 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 30 09:45:57 2018 -0400

    TestDriver: Replace strncpy with strcpy
    
    GCC 8.1.0 now gives an error if `strncpy` is called with a bound
    depending on the length of the source argument.  Replace `strncpy` with
    `strcpy` as the length is known a priori.
    
    Fixes: #18038

diff --git a/Templates/TestDriver.cxx.in b/Templates/TestDriver.cxx.in
index ff3c869..ac531c0 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));
   }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca49f1a8e4cce294b2c4c10e80418b736986c2dd
commit ca49f1a8e4cce294b2c4c10e80418b736986c2dd
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 30 09:39:16 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 30 09:39:16 2018 -0400

    CPack: Fix cross-compilation of WiX generator
    
    Fix the case of the path to source files so it works on case-sensitive
    filesystems.
    
    Fixes: #18042

diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index a0010a2..61327be 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

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=83630d491888705dc650f2ae62de9943181b50df
commit 83630d491888705dc650f2ae62de9943181b50df
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue May 29 12:52:38 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue May 29 14:00:33 2018 -0400

    cmSystemTools: Revert GetRealPath implementation on Windows
    
    The use of `uv_fs_realpath` introduced by commit v3.11.0-rc1~445^2~1
    (cmSystemTools: Implement GetRealPath on Windows, 2017-10-02) causes
    `subst` drives to be expanded on Windows, breaking existing use cases.
    Revert its use until an alternative implementation can be chosen.
    
    Preserve the behavior introduced by commit v3.11.0-rc1~445^2
    (cmTimestamp: For symlinks switch to timestamp of resolved path,
    2017-10-02) by retaining use of `uv_fs_realpath` in a function of
    a different name.
    
    Fixes: #18033
    Issue: #17206

diff --git a/Help/release/3.11.rst b/Help/release/3.11.rst
index 971b3e2..214da0d 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/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index eeb73c3..6f326de 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 a53afde..4390c86 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 f1e9283..14cf6e9 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();

-----------------------------------------------------------------------

Summary of changes:
 Help/release/3.11.rst       |    7 +++++++
 Source/CMakeLists.txt       |    4 ++--
 Source/cmSystemTools.cxx    |   10 +++++++---
 Source/cmSystemTools.h      |   10 ++++++----
 Source/cmTimestamp.cxx      |    3 ++-
 Templates/TestDriver.cxx.in |    2 +-
 6 files changed, 25 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list