[Cmake-commits] CMake branch, master, updated. v3.9.2-779-g3ea87bc

Kitware Robot kwrobot at kitware.com
Tue Sep 12 09:45:22 EDT 2017


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  3ea87bce69d1b6120b227fed3838f1bc9ab45db1 (commit)
       via  cb171502287db0e4911faa10d748c72f08e5a9dd (commit)
       via  3f8c6cab4bb4a9f68708c11a38e4487dad363e38 (commit)
       via  ea7177b94760d6abcb05649bf694143c53608766 (commit)
       via  8a4755ca57d5a0ef664b067f6ace737b417ef40d (commit)
       via  95b17c89be15a768178d66f42573d90852a1b986 (commit)
       via  a451995fc6485929bc606986572eee162d6fc4e4 (commit)
       via  1e6569c9f4614b3d915653bab2fd423c99d814d6 (commit)
       via  3e8b3e94dc6d3ea59dd437f1ea46786f9f0ec1d2 (commit)
      from  f06ddacafc68369150f3a6fa806e8e4af421dc7b (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=3ea87bce69d1b6120b227fed3838f1bc9ab45db1
commit 3ea87bce69d1b6120b227fed3838f1bc9ab45db1
Merge: cb17150 8a4755c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 12 13:38:28 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Sep 12 09:39:40 2017 -0400

    Merge topic 'vs-clang-llvm-support'
    
    8a4755ca VS: Update support for LLVM-vs* toolsets from LLVM 5.0
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1231


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb171502287db0e4911faa10d748c72f08e5a9dd
commit cb171502287db0e4911faa10d748c72f08e5a9dd
Merge: 3f8c6ca 95b17c8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 12 13:38:03 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Sep 12 09:38:24 2017 -0400

    Merge topic 'get-or-create-source-group'
    
    95b17c89 Use cmMakefile::GetOrCreateSourceGroup in cmQtAutogeneratorsInitializer
    a451995f Use cmMakefile::GetOrCreateSourceGroup in cmSourceGroupCommand
    1e6569c9 cmMakefile: Add GetOrCreateSourceGroup methods
    3e8b3e94 cmMakefile: Collect source group methods in one place
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1243


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f8c6cab4bb4a9f68708c11a38e4487dad363e38
commit 3f8c6cab4bb4a9f68708c11a38e4487dad363e38
Merge: f06ddac ea7177b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 12 13:35:55 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Sep 12 09:36:12 2017 -0400

    Merge topic 'iwyu-update'
    
    ea7177b9 cmCustomCommandGenerator: Fix include-what-you-use diagnostic
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1252


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea7177b94760d6abcb05649bf694143c53608766
commit ea7177b94760d6abcb05649bf694143c53608766
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 11 14:39:20 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 11 14:39:58 2017 -0400

    cmCustomCommandGenerator: Fix include-what-you-use diagnostic
    
    For `size_t` we should include `stddef.h`.

diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx
index c6a2800..fa1c70e 100644
--- a/Source/cmCustomCommandGenerator.cxx
+++ b/Source/cmCustomCommandGenerator.cxx
@@ -13,6 +13,8 @@
 #include "cmSystemTools.h"
 #include "cm_auto_ptr.hxx"
 
+#include <stddef.h>
+
 cmCustomCommandGenerator::cmCustomCommandGenerator(cmCustomCommand const& cc,
                                                    const std::string& config,
                                                    cmLocalGenerator* lg)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a4755ca57d5a0ef664b067f6ace737b417ef40d
commit 8a4755ca57d5a0ef664b067f6ace737b417ef40d
Author:     Konstantin Ivlev <tomskside at gmail.com>
AuthorDate: Mon Sep 4 15:12:43 2017 +0700
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 11 09:58:22 2017 -0400

    VS: Update support for LLVM-vs* toolsets from LLVM 5.0
    
    Revert commit v3.7.0-rc1~25^2 (VS: Recognize VS/LLVM toolset names as
    Clang, 2016-09-28).  Since at least LLVM 5.0 the VS integration of the
    LLVM toolchain now mimics cl and accepts MSVC-style command-line
    arguments (unlike Microsoft Clang/C2).
    
    Fixes: #17193, #17235

diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index cfe6e1c..d9f213b 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -186,7 +186,7 @@ else()
   if(_MSVC_C_ARCHITECTURE_FAMILY STREQUAL "ARM" OR _MSVC_CXX_ARCHITECTURE_FAMILY STREQUAL "ARM")
     set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib")
   elseif(MSVC_VERSION GREATER 1310)
-    if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "(v[0-9]+_clang_.*|LLVM-vs[0-9]+.*)")
+    if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
       # Clang/C2 in MSVC14 Update 1 seems to not support -fsantinize (yet?)
       # set(_RTC1 "-fsantinize=memory,safe-stack")
       set(_FLAGS_CXX " -frtti -fexceptions")
@@ -285,7 +285,7 @@ macro(__windows_compiler_msvc lang)
 
   if("x${lang}" STREQUAL "xC" OR
       "x${lang}" STREQUAL "xCXX")
-    if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "(v[0-9]+_clang_.*|LLVM-vs[0-9]+.*)")
+    if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
       # note: MSVC 14 2015 Update 1 sets -fno-ms-compatibility by default, but this does not allow one to compile many projects
       # that include MS's own headers. CMake itself is affected project too.
       string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}")
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 7fe2f2a..4a90d53 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2471,8 +2471,7 @@ void cmVisualStudio10TargetGenerator::WriteClOptions(
   }
 
   if (this->MSTools) {
-    cmsys::RegularExpression clangToolset(
-      "(v[0-9]+_clang_.*|LLVM-vs[0-9]+.*)");
+    cmsys::RegularExpression clangToolset("v[0-9]+_clang_.*");
     const char* toolset = this->GlobalGenerator->GetPlatformToolset();
     if (toolset && clangToolset.find(toolset)) {
       this->WriteString("<ObjectFileName>"

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95b17c89be15a768178d66f42573d90852a1b986
commit 95b17c89be15a768178d66f42573d90852a1b986
Author:     Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Thu Sep 7 12:02:34 2017 +0200
Commit:     Sebastian Holtermann <sebholt at xwmw.org>
CommitDate: Sat Sep 9 09:44:55 2017 +0200

    Use cmMakefile::GetOrCreateSourceGroup in cmQtAutogeneratorsInitializer

diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 22ac9d2..1b6020f 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -237,20 +237,7 @@ static bool AddToSourceGroup(cmMakefile* makefile, const std::string& fileName,
     }
     // Generate a source group on demand
     if (!groupName.empty()) {
-      {
-        const char* delimiter =
-          makefile->GetDefinition("SOURCE_GROUP_DELIMITER");
-        if (delimiter == nullptr) {
-          delimiter = "\\";
-        }
-        std::vector<std::string> folders =
-          cmSystemTools::tokenize(groupName, delimiter);
-        sourceGroup = makefile->GetSourceGroup(folders);
-        if (sourceGroup == nullptr) {
-          makefile->AddSourceGroup(folders);
-          sourceGroup = makefile->GetSourceGroup(folders);
-        }
-      }
+      sourceGroup = makefile->GetOrCreateSourceGroup(groupName);
       if (sourceGroup == nullptr) {
         std::ostringstream ost;
         ost << cmQtAutoGen::GeneratorNameUpper(genType);

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a451995fc6485929bc606986572eee162d6fc4e4
commit a451995fc6485929bc606986572eee162d6fc4e4
Author:     Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Thu Sep 7 12:00:13 2017 +0200
Commit:     Sebastian Holtermann <sebholt at xwmw.org>
CommitDate: Sat Sep 9 09:44:55 2017 +0200

    Use cmMakefile::GetOrCreateSourceGroup in cmSourceGroupCommand

diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx
index 77fde7b..890109e 100644
--- a/Source/cmSourceGroupCommand.cxx
+++ b/Source/cmSourceGroupCommand.cxx
@@ -61,23 +61,6 @@ bool rootIsPrefix(const std::string& root,
   return true;
 }
 
-cmSourceGroup* addSourceGroup(const std::vector<std::string>& tokenizedPath,
-                              cmMakefile& makefile)
-{
-  cmSourceGroup* sg;
-
-  sg = makefile.GetSourceGroup(tokenizedPath);
-  if (!sg) {
-    makefile.AddSourceGroup(tokenizedPath);
-    sg = makefile.GetSourceGroup(tokenizedPath);
-    if (!sg) {
-      return nullptr;
-    }
-  }
-
-  return sg;
-}
-
 std::string prepareFilePathForTree(const std::string& path,
                                    const std::string& currentSourceDir)
 {
@@ -121,7 +104,7 @@ bool addFilesToItsSourceGroups(const std::string& root,
     if (tokenizedPath.size() > 1) {
       tokenizedPath.pop_back();
 
-      sg = addSourceGroup(tokenizedPath, makefile);
+      sg = makefile.GetOrCreateSourceGroup(tokenizedPath);
 
       if (!sg) {
         errorMsg = "Could not create source group for file: " + *it;
@@ -158,20 +141,7 @@ bool cmSourceGroupCommand::InitialPass(std::vector<std::string> const& args,
     return true;
   }
 
-  std::string delimiter = "\\";
-  if (this->Makefile->GetDefinition("SOURCE_GROUP_DELIMITER")) {
-    delimiter = this->Makefile->GetDefinition("SOURCE_GROUP_DELIMITER");
-  }
-
-  std::vector<std::string> folders =
-    cmSystemTools::tokenize(args[0], delimiter);
-
-  cmSourceGroup* sg = nullptr;
-  sg = this->Makefile->GetSourceGroup(folders);
-  if (!sg) {
-    this->Makefile->AddSourceGroup(folders);
-    sg = this->Makefile->GetSourceGroup(folders);
-  }
+  cmSourceGroup* sg = this->Makefile->GetOrCreateSourceGroup(args[0]);
 
   if (!sg) {
     this->SetError("Could not create or find source group");

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e6569c9f4614b3d915653bab2fd423c99d814d6
commit 1e6569c9f4614b3d915653bab2fd423c99d814d6
Author:     Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Thu Sep 7 11:55:52 2017 +0200
Commit:     Sebastian Holtermann <sebholt at xwmw.org>
CommitDate: Sat Sep 9 09:44:55 2017 +0200

    cmMakefile: Add GetOrCreateSourceGroup methods

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 24c2de2..c9dc93c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2010,6 +2010,27 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
   sg->SetGroupRegex(regex);
 }
 
+cmSourceGroup* cmMakefile::GetOrCreateSourceGroup(
+  const std::vector<std::string>& folders)
+{
+  cmSourceGroup* sg = this->GetSourceGroup(folders);
+  if (sg == nullptr) {
+    this->AddSourceGroup(folders);
+    sg = this->GetSourceGroup(folders);
+  }
+  return sg;
+}
+
+cmSourceGroup* cmMakefile::GetOrCreateSourceGroup(const std::string& name)
+{
+  const char* delimiter = this->GetDefinition("SOURCE_GROUP_DELIMITER");
+  if (delimiter == nullptr) {
+    delimiter = "\\";
+  }
+  return this->GetOrCreateSourceGroup(
+    cmSystemTools::tokenize(name, delimiter));
+}
+
 /**
  * Find a source group whose regular expression matches the filename
  * part of the given source name.  Search backward through the list of
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 31ae229..398604d 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -475,6 +475,18 @@ public:
                       const char* regex = nullptr);
 
   /**
+   * Get and existing or create a new source group.
+   */
+  cmSourceGroup* GetOrCreateSourceGroup(
+    const std::vector<std::string>& folders);
+
+  /**
+   * Get and existing or create a new source group.
+   * The name will be tokenized.
+   */
+  cmSourceGroup* GetOrCreateSourceGroup(const std::string& name);
+
+  /**
    * find what source group this source is in
    */
   cmSourceGroup* FindSourceGroup(const char* source,

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e8b3e94dc6d3ea59dd437f1ea46786f9f0ec1d2
commit 3e8b3e94dc6d3ea59dd437f1ea46786f9f0ec1d2
Author:     Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Thu Sep 7 11:42:29 2017 +0200
Commit:     Sebastian Holtermann <sebholt at xwmw.org>
CommitDate: Sat Sep 9 09:44:55 2017 +0200

    cmMakefile: Collect source group methods in one place

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 230c210..24c2de2 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2010,6 +2010,37 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
   sg->SetGroupRegex(regex);
 }
 
+/**
+ * Find a source group whose regular expression matches the filename
+ * part of the given source name.  Search backward through the list of
+ * source groups, and take the first matching group found.  This way
+ * non-inherited SOURCE_GROUP commands will have precedence over
+ * inherited ones.
+ */
+cmSourceGroup* cmMakefile::FindSourceGroup(
+  const char* source, std::vector<cmSourceGroup>& groups) const
+{
+  // First search for a group that lists the file explicitly.
+  for (std::vector<cmSourceGroup>::reverse_iterator sg = groups.rbegin();
+       sg != groups.rend(); ++sg) {
+    cmSourceGroup* result = sg->MatchChildrenFiles(source);
+    if (result) {
+      return result;
+    }
+  }
+
+  // Now search for a group whose regex matches the file.
+  for (std::vector<cmSourceGroup>::reverse_iterator sg = groups.rbegin();
+       sg != groups.rend(); ++sg) {
+    cmSourceGroup* result = sg->MatchChildrenRegex(source);
+    if (result) {
+      return result;
+    }
+  }
+
+  // Shouldn't get here, but just in case, return the default group.
+  return &groups.front();
+}
 #endif
 
 static bool mightExpandVariablesCMP0019(const char* s)
@@ -2818,40 +2849,6 @@ std::string cmMakefile::GetConfigurations(std::vector<std::string>& configs,
   return buildType;
 }
 
-#if defined(CMAKE_BUILD_WITH_CMAKE)
-/**
- * Find a source group whose regular expression matches the filename
- * part of the given source name.  Search backward through the list of
- * source groups, and take the first matching group found.  This way
- * non-inherited SOURCE_GROUP commands will have precedence over
- * inherited ones.
- */
-cmSourceGroup* cmMakefile::FindSourceGroup(
-  const char* source, std::vector<cmSourceGroup>& groups) const
-{
-  // First search for a group that lists the file explicitly.
-  for (std::vector<cmSourceGroup>::reverse_iterator sg = groups.rbegin();
-       sg != groups.rend(); ++sg) {
-    cmSourceGroup* result = sg->MatchChildrenFiles(source);
-    if (result) {
-      return result;
-    }
-  }
-
-  // Now search for a group whose regex matches the file.
-  for (std::vector<cmSourceGroup>::reverse_iterator sg = groups.rbegin();
-       sg != groups.rend(); ++sg) {
-    cmSourceGroup* result = sg->MatchChildrenRegex(source);
-    if (result) {
-      return result;
-    }
-  }
-
-  // Shouldn't get here, but just in case, return the default group.
-  return &groups.front();
-}
-#endif
-
 bool cmMakefile::IsFunctionBlocked(const cmListFileFunction& lff,
                                    cmExecutionStatus& status)
 {
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 938b61b..31ae229 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -270,21 +270,6 @@ public:
                        bool excludeFromAll = false);
   void AddAlias(const std::string& libname, const std::string& tgt);
 
-#if defined(CMAKE_BUILD_WITH_CMAKE)
-  /**
-   * Add a root source group for consideration when adding a new source.
-   */
-  void AddSourceGroup(const std::string& name, const char* regex = nullptr);
-
-  /**
-   * Add a source group for consideration when adding a new source.
-   * name is tokenized.
-   */
-  void AddSourceGroup(const std::vector<std::string>& name,
-                      const char* regex = nullptr);
-
-#endif
-
   //@{
   /**
      * Set, Push, Pop policy values for CMake.
@@ -476,6 +461,24 @@ public:
    * Get the source group
    */
   cmSourceGroup* GetSourceGroup(const std::vector<std::string>& name) const;
+
+  /**
+   * Add a root source group for consideration when adding a new source.
+   */
+  void AddSourceGroup(const std::string& name, const char* regex = nullptr);
+
+  /**
+   * Add a source group for consideration when adding a new source.
+   * name is tokenized.
+   */
+  void AddSourceGroup(const std::vector<std::string>& name,
+                      const char* regex = nullptr);
+
+  /**
+   * find what source group this source is in
+   */
+  cmSourceGroup* FindSourceGroup(const char* source,
+                                 std::vector<cmSourceGroup>& groups) const;
 #endif
 
   /**
@@ -552,14 +555,6 @@ public:
                     bool atOnly, bool escapeQuotes,
                     cmNewLineStyle = cmNewLineStyle());
 
-#if defined(CMAKE_BUILD_WITH_CMAKE)
-  /**
-   * find what source group this source is in
-   */
-  cmSourceGroup* FindSourceGroup(const char* source,
-                                 std::vector<cmSourceGroup>& groups) const;
-#endif
-
   /**
    * Print a command's invocation
    */

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

Summary of changes:
 Modules/Platform/Windows-MSVC.cmake        |    4 +-
 Source/cmCustomCommandGenerator.cxx        |    2 +
 Source/cmMakefile.cxx                      |   86 +++++++++++++++++-----------
 Source/cmMakefile.h                        |   53 +++++++++--------
 Source/cmQtAutoGeneratorInitializer.cxx    |   15 +----
 Source/cmSourceGroupCommand.cxx            |   34 +----------
 Source/cmVisualStudio10TargetGenerator.cxx |    3 +-
 7 files changed, 90 insertions(+), 107 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list