[Cmake-commits] CMake branch, master, updated. v3.12.0-392-g575f06e

Kitware Robot kwrobot at kitware.com
Thu Aug 9 07:55:14 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  575f06e48c456c3b556fe6f70d0e3b23a3830e3c (commit)
       via  1c773b5d3aae0ad2146b1076ae8e00166f49a849 (commit)
       via  aefb8559dca283b81d20a3f40afc8f39e6161ecb (commit)
       via  ba872ea9c372b207d4fadaea7edc235c212e9a85 (commit)
       via  4d76239a5107c0eb63486d948ae862784cfc6f9b (commit)
      from  e1e9e0697bdf0741ef9cc36441b448697ff6d86b (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=575f06e48c456c3b556fe6f70d0e3b23a3830e3c
commit 575f06e48c456c3b556fe6f70d0e3b23a3830e3c
Merge: 1c773b5 ba872ea
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Aug 9 11:52:45 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Aug 9 07:53:49 2018 -0400

    Merge topic 'update-kwsys'
    
    ba872ea9c3 Merge branch 'upstream-KWSys' into update-kwsys
    4d76239a51 KWSys 2018-08-07 (9044518f)
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2268


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c773b5d3aae0ad2146b1076ae8e00166f49a849
commit 1c773b5d3aae0ad2146b1076ae8e00166f49a849
Merge: e1e9e06 aefb855
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Aug 9 11:52:02 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Aug 9 07:52:39 2018 -0400

    Merge topic 'iwyu-std-hash'
    
    aefb8559dc IWYU: Fix workaround mapping for std::hash
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2267


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aefb8559dca283b81d20a3f40afc8f39e6161ecb
commit aefb8559dca283b81d20a3f40afc8f39e6161ecb
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 7 08:18:25 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 7 12:04:58 2018 -0400

    IWYU: Fix workaround mapping for std::hash
    
    It is provided by `functional`, not `utility`.  Fix the mapping added by
    commit 276d3c7afe (IWYU: Add workaround mapping for std::hash,
    2018-07-31).  Also generalize the workaround from commit v3.12.0-rc1~39^2~1
    (IWYU: Define a macro to tell code it is preprocessing for iwyu,
    2018-05-25) to allow local builds to configure specific flags.  This
    is needed because iwyu behaves differently in different environments.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e20d770..1fcd8f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -285,7 +285,8 @@ if(CMake_RUN_IWYU)
     message(FATAL_ERROR "CMake_RUN_IWYU is ON but include-what-you-use is not found!")
   endif()
   set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE
-    "${IWYU_COMMAND};-Xiwyu;--mapping_file=${CMake_SOURCE_DIR}/Utilities/IWYU/mapping.imp;-w;-DCMAKE_IWYU")
+    "${IWYU_COMMAND};-Xiwyu;--mapping_file=${CMake_SOURCE_DIR}/Utilities/IWYU/mapping.imp;-w")
+  list(APPEND CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${CMake_IWYU_OPTIONS})
 endif()
 
 
diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
index d8c7ab3..48f17ef 100644
--- a/Source/cmFindPackageCommand.h
+++ b/Source/cmFindPackageCommand.h
@@ -7,6 +7,7 @@
 
 #include "cm_kwiml.h"
 #include <cstddef>
+#include <functional>
 #include <map>
 #include <set>
 #include <string>
@@ -15,14 +16,12 @@
 // IWYU insists we should forward-declare instead of including <functional>,
 // but we cannot forward-declare reliably because some C++ standard libraries
 // put the template in an inline namespace.
-#ifdef CMAKE_IWYU
+#ifdef CMAKE_IWYU_FORWARD_STD_HASH
 /* clang-format off */
 namespace std {
   template <class T> struct hash;
 }
 /* clang-format on */
-#else
-#  include <functional>
 #endif
 
 #include "cmFindCommon.h"
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index b05eac4..c267160 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -37,7 +37,6 @@
 #include <set>
 #include <string>
 #include <unordered_map>
-#include <utility>
 #include <vector>
 
 // Get rid of some windows macros:
diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp
index 77bb572..5af8b85 100644
--- a/Utilities/IWYU/mapping.imp
+++ b/Utilities/IWYU/mapping.imp
@@ -53,7 +53,7 @@
   #{ symbol: [ "std::pair", private, "<set>", public ] },
 
   # HACK: iwyu wrongly thinks that <system_error> is needed for std::hash
-  { symbol: [ "std::hash", private, "<utility>", public ] },
+  { symbol: [ "std::hash", private, "<functional>", public ] },
 
   # __decay_and_strip is used internally in the C++11 standard library.
   # IWYU does not classify it as internal and suggests to add <type_traits>.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba872ea9c372b207d4fadaea7edc235c212e9a85
commit ba872ea9c372b207d4fadaea7edc235c212e9a85
Merge: 6038f07 4d76239
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 7 07:16:09 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 7 07:16:09 2018 -0400

    Merge branch 'upstream-KWSys' into update-kwsys
    
    * upstream-KWSys:
      KWSys 2018-08-07 (9044518f)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d76239a5107c0eb63486d948ae862784cfc6f9b
commit 4d76239a5107c0eb63486d948ae862784cfc6f9b
Author:     KWSys Upstream <kwrobot at kitware.com>
AuthorDate: Tue Aug 7 07:15:48 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 7 07:16:04 2018 -0400

    KWSys 2018-08-07 (9044518f)
    
    Code extracted from:
    
        https://gitlab.kitware.com/utils/kwsys.git
    
    at commit 9044518f428b84da70f1e02d09b7cd4c35366831 (master).
    
    Upstream Shortlog
    -----------------
    
    Jon Chronopoulos (1):
          55a29eba SystemTools: Allow FileExists on Windows to follow symlinks

diff --git a/SystemTools.cxx b/SystemTools.cxx
index d552d9f..476fe08 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -1197,9 +1197,27 @@ bool SystemTools::FileExists(const std::string& filename)
   }
   return access(filename.c_str(), R_OK) == 0;
 #elif defined(_WIN32)
-  return (
-    GetFileAttributesW(Encoding::ToWindowsExtendedPath(filename).c_str()) !=
-    INVALID_FILE_ATTRIBUTES);
+  DWORD attr =
+    GetFileAttributesW(Encoding::ToWindowsExtendedPath(filename).c_str());
+  if (attr == INVALID_FILE_ATTRIBUTES) {
+    return false;
+  }
+
+  if (attr & FILE_ATTRIBUTE_REPARSE_POINT) {
+    // Using 0 instead of GENERIC_READ as it allows reading of file attributes
+    // even if we do not have permission to read the file itself
+    HANDLE handle =
+      CreateFileW(Encoding::ToWindowsExtendedPath(filename).c_str(), 0, 0,
+                  NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
+
+    if (handle == INVALID_HANDLE_VALUE) {
+      return false;
+    }
+
+    CloseHandle(handle);
+  }
+
+  return true;
 #else
 // SCO OpenServer 5.0.7/3.2's command has 711 permission.
 #  if defined(_SCO_DS)

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

Summary of changes:
 CMakeLists.txt                |  3 ++-
 Source/cmFindPackageCommand.h |  5 ++---
 Source/cmServerProtocol.cxx   |  1 -
 Source/kwsys/SystemTools.cxx  | 24 +++++++++++++++++++++---
 Utilities/IWYU/mapping.imp    |  2 +-
 5 files changed, 26 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list