[Cmake-commits] CMake branch, master, updated. v3.10.1-827-gb1fd313

Kitware Robot kwrobot at kitware.com
Wed Jan 17 15:15:05 EST 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  b1fd31382654564e01eb0224bd18df81f61cb82f (commit)
       via  657898ecad4fecff001964b3f0e27e77b5f9ffcd (commit)
       via  2489e5af5b66aee1681b74b7b744072c5fb8046f (commit)
       via  969c1f94aed7abbc71dc73b442817fe86a43b4df (commit)
      from  af30899cb4431d6712fea5ac09215a92b3f16ccb (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=b1fd31382654564e01eb0224bd18df81f61cb82f
commit b1fd31382654564e01eb0224bd18df81f61cb82f
Merge: 657898e 2489e5a
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Wed Jan 17 20:08:19 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Jan 17 15:08:22 2018 -0500

    Merge topic 'FindDoxygen-macos-utils'
    
    2489e5af FindDoxygen: On macOS search in '/Applications/Utilities' too
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1661


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=657898ecad4fecff001964b3f0e27e77b5f9ffcd
commit 657898ecad4fecff001964b3f0e27e77b5f9ffcd
Merge: af30899 969c1f9
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Wed Jan 17 20:05:54 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Jan 17 15:06:02 2018 -0500

    Merge topic 'cmSourceGroup-modern-cxx'
    
    969c1f94 cmSourceGroup: code improvements; use std::string and C++11 loops
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1656


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2489e5af5b66aee1681b74b7b744072c5fb8046f
commit 2489e5af5b66aee1681b74b7b744072c5fb8046f
Author:     Thomas Thielemann <thomas at th-thielemann.de>
AuthorDate: Sun Jan 14 12:07:08 2018 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 16 10:16:32 2018 -0500

    FindDoxygen: On macOS search in '/Applications/Utilities' too
    
    `FindDoxygen` already searches in hard-coded `/Applications/Doxygen.app`
    directories.  Search in the `Utilities` subdirectory too in case users
    choose to put doxygen there.

diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake
index 8aea4e0..599d799 100644
--- a/Modules/FindDoxygen.cmake
+++ b/Modules/FindDoxygen.cmake
@@ -411,6 +411,8 @@ macro(_Doxygen_find_doxygen)
             "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin"
             /Applications/Doxygen.app/Contents/Resources
             /Applications/Doxygen.app/Contents/MacOS
+            /Applications/Utilities/Doxygen.app/Contents/Resources
+            /Applications/Utilities/Doxygen.app/Contents/MacOS
         DOC "Doxygen documentation generation tool (http://www.doxygen.org)"
     )
     mark_as_advanced(DOXYGEN_EXECUTABLE)
@@ -492,8 +494,11 @@ macro(_Doxygen_find_dot)
             "C:/Program Files/ATT/Graphviz/bin"
             [HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin
             /Applications/Graphviz.app/Contents/MacOS
+            /Applications/Utilities/Graphviz.app/Contents/MacOS
             /Applications/Doxygen.app/Contents/Resources
             /Applications/Doxygen.app/Contents/MacOS
+            /Applications/Utilities/Doxygen.app/Contents/Resources
+            /Applications/Utilities/Doxygen.app/Contents/MacOS
         DOC "Dot tool for use with Doxygen"
     )
     mark_as_advanced(DOXYGEN_DOT_EXECUTABLE)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=969c1f94aed7abbc71dc73b442817fe86a43b4df
commit 969c1f94aed7abbc71dc73b442817fe86a43b4df
Author:     Vitaly Stakhovsky <vvs31415 at gitlab.org>
AuthorDate: Wed Jan 10 19:01:49 2018 -0500
Commit:     Vitaly Stakhovsky <vvs31415 at gitlab.org>
CommitDate: Wed Jan 10 19:01:49 2018 -0500

    cmSourceGroup: code improvements; use std::string and C++11 loops
    
    Topic-rename: cmSourceGroup-modern-cxx

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d069a5c..1a728c2 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1961,7 +1961,7 @@ cmSourceGroup* cmMakefile::GetSourceGroup(
   if (sg != nullptr) {
     // iterate through its children to find match source group
     for (unsigned int i = 1; i < name.size(); ++i) {
-      sg = sg->LookupChild(name[i].c_str());
+      sg = sg->LookupChild(name[i]);
       if (sg == nullptr) {
         break;
       }
@@ -2005,7 +2005,7 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
   if (i == -1) {
     // group does not exist nor belong to any existing group
     // add its first component
-    this->SourceGroups.push_back(cmSourceGroup(name[0].c_str(), regex));
+    this->SourceGroups.push_back(cmSourceGroup(name[0], regex));
     sg = this->GetSourceGroup(currentName);
     i = 0; // last component found
   }
@@ -2015,9 +2015,8 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
   }
   // build the whole source group path
   for (++i; i <= lastElement; ++i) {
-    sg->AddChild(
-      cmSourceGroup(name[i].c_str(), nullptr, sg->GetFullName().c_str()));
-    sg = sg->LookupChild(name[i].c_str());
+    sg->AddChild(cmSourceGroup(name[i], nullptr, sg->GetFullName().c_str()));
+    sg = sg->LookupChild(name[i]);
   }
 
   sg->SetGroupRegex(regex);
diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx
index 18bcb49..12ef62b 100644
--- a/Source/cmSourceGroup.cxx
+++ b/Source/cmSourceGroup.cxx
@@ -8,7 +8,7 @@ public:
   std::vector<cmSourceGroup> GroupChildren;
 };
 
-cmSourceGroup::cmSourceGroup(const char* name, const char* regex,
+cmSourceGroup::cmSourceGroup(const std::string& name, const char* regex,
                              const char* parentName)
   : Name(name)
 {
@@ -70,14 +70,14 @@ std::string const& cmSourceGroup::GetFullName() const
   return this->FullName;
 }
 
-bool cmSourceGroup::MatchesRegex(const char* name)
+bool cmSourceGroup::MatchesRegex(const std::string& name)
 {
   return this->GroupRegex.find(name);
 }
 
-bool cmSourceGroup::MatchesFiles(const char* name)
+bool cmSourceGroup::MatchesFiles(const std::string& name) const
 {
-  return this->GroupFiles.find(name) != this->GroupFiles.end();
+  return this->GroupFiles.find(name) != this->GroupFiles.cend();
 }
 
 void cmSourceGroup::AssignSource(const cmSourceFile* sf)
@@ -95,21 +95,12 @@ void cmSourceGroup::AddChild(cmSourceGroup const& child)
   this->Internal->GroupChildren.push_back(child);
 }
 
-cmSourceGroup* cmSourceGroup::LookupChild(const char* name) const
+cmSourceGroup* cmSourceGroup::LookupChild(const std::string& name)
 {
-  // initializing iterators
-  std::vector<cmSourceGroup>::const_iterator iter =
-    this->Internal->GroupChildren.begin();
-  const std::vector<cmSourceGroup>::const_iterator end =
-    this->Internal->GroupChildren.end();
-
-  // st
-  for (; iter != end; ++iter) {
-    std::string const& sgName = iter->GetName();
-
+  for (cmSourceGroup& group : this->Internal->GroupChildren) {
     // look if descenened is the one were looking for
-    if (sgName == name) {
-      return const_cast<cmSourceGroup*>(&(*iter)); // if it so return it
+    if (group.GetName() == name) {
+      return (&group); // if it so return it
     }
   }
 
@@ -117,19 +108,13 @@ cmSourceGroup* cmSourceGroup::LookupChild(const char* name) const
   return nullptr;
 }
 
-cmSourceGroup* cmSourceGroup::MatchChildrenFiles(const char* name)
+cmSourceGroup* cmSourceGroup::MatchChildrenFiles(const std::string& name)
 {
-  // initializing iterators
-  std::vector<cmSourceGroup>::iterator iter =
-    this->Internal->GroupChildren.begin();
-  std::vector<cmSourceGroup>::iterator end =
-    this->Internal->GroupChildren.end();
-
   if (this->MatchesFiles(name)) {
     return this;
   }
-  for (; iter != end; ++iter) {
-    cmSourceGroup* result = iter->MatchChildrenFiles(name);
+  for (cmSourceGroup& group : this->Internal->GroupChildren) {
+    cmSourceGroup* result = group.MatchChildrenFiles(name);
     if (result) {
       return result;
     }
@@ -137,16 +122,10 @@ cmSourceGroup* cmSourceGroup::MatchChildrenFiles(const char* name)
   return nullptr;
 }
 
-cmSourceGroup* cmSourceGroup::MatchChildrenRegex(const char* name)
+cmSourceGroup* cmSourceGroup::MatchChildrenRegex(const std::string& name)
 {
-  // initializing iterators
-  std::vector<cmSourceGroup>::iterator iter =
-    this->Internal->GroupChildren.begin();
-  std::vector<cmSourceGroup>::iterator end =
-    this->Internal->GroupChildren.end();
-
-  for (; iter != end; ++iter) {
-    cmSourceGroup* result = iter->MatchChildrenRegex(name);
+  for (cmSourceGroup& group : this->Internal->GroupChildren) {
+    cmSourceGroup* result = group.MatchChildrenRegex(name);
     if (result) {
       return result;
     }
diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h
index 7c7c35f..b39f8dd 100644
--- a/Source/cmSourceGroup.h
+++ b/Source/cmSourceGroup.h
@@ -26,7 +26,7 @@ class cmSourceGroupInternals;
 class cmSourceGroup
 {
 public:
-  cmSourceGroup(const char* name, const char* regex,
+  cmSourceGroup(const std::string& name, const char* regex,
                 const char* parentName = nullptr);
   cmSourceGroup(cmSourceGroup const& r);
   ~cmSourceGroup();
@@ -50,7 +50,7 @@ public:
   /**
    * Looks up child and returns it
    */
-  cmSourceGroup* LookupChild(const char* name) const;
+  cmSourceGroup* LookupChild(const std::string& name);
 
   /**
    * Get the name of this group.
@@ -65,23 +65,23 @@ public:
   /**
    * Check if the given name matches this group's regex.
    */
-  bool MatchesRegex(const char* name);
+  bool MatchesRegex(const std::string& name);
 
   /**
    * Check if the given name matches this group's explicit file list.
    */
-  bool MatchesFiles(const char* name);
+  bool MatchesFiles(const std::string& name) const;
 
   /**
    * Check if the given name matches this group's explicit file list
    * in children.
    */
-  cmSourceGroup* MatchChildrenFiles(const char* name);
+  cmSourceGroup* MatchChildrenFiles(const std::string& name);
 
   /**
    * Check if the given name matches this group's regex in children.
    */
-  cmSourceGroup* MatchChildrenRegex(const char* name);
+  cmSourceGroup* MatchChildrenRegex(const std::string& name);
 
   /**
    * Assign the given source file to this group.  Used only by

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

Summary of changes:
 Modules/FindDoxygen.cmake |    5 +++++
 Source/cmMakefile.cxx     |    9 ++++-----
 Source/cmSourceGroup.cxx  |   49 +++++++++++++--------------------------------
 Source/cmSourceGroup.h    |   12 +++++------
 4 files changed, 29 insertions(+), 46 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list