[Cmake-commits] CMake branch, next, updated. v3.4.1-1883-g466e182

Chuck Atkins chuck.atkins at kitware.com
Fri Jan 8 15:36:41 EST 2016


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, next has been updated
       via  466e182975d4dde63719f0c2aa28de12afad0b61 (commit)
       via  aa579b552c0e7321ed580e3df15325aa3e102560 (commit)
      from  7a36e812c4f26bdf7e70d2b284b9f7650a4369ca (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=466e182975d4dde63719f0c2aa28de12afad0b61
commit 466e182975d4dde63719f0c2aa28de12afad0b61
Merge: 7a36e81 aa579b5
Author:     Chuck Atkins <chuck.atkins at kitware.com>
AuthorDate: Fri Jan 8 15:36:39 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 8 15:36:39 2016 -0500

    Merge topic 'allow-variables-for-find-defaults' into next
    
    aa579b55 Fix segfault from uninitialized makefile


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa579b552c0e7321ed580e3df15325aa3e102560
commit aa579b552c0e7321ed580e3df15325aa3e102560
Author:     Chuck Atkins <chuck.atkins at kitware.com>
AuthorDate: Fri Jan 8 15:36:04 2016 -0500
Commit:     Chuck Atkins <chuck.atkins at kitware.com>
CommitDate: Fri Jan 8 15:36:04 2016 -0500

    Fix segfault from uninitialized makefile

diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index ee94869..8c237ca 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -57,25 +57,6 @@ cmFindCommon::~cmFindCommon()
 }
 
 //----------------------------------------------------------------------------
-inline bool ListContains2Helper(const cmMakefile* make,
-  const std::string& cmakeVar, const std::string& test1,
-  const std::string& test2)
-{
-  std::vector<std::string> v;
-  cmSystemTools::ExpandListArgument(
-    make->GetSafeDefinition(cmakeVar), v, true);
-  for(std::vector<std::string>::const_iterator i = v.begin();
-    i != v.end(); ++i)
-    {
-    if(*i == test1 || *i == test2)
-      {
-      return true;
-      }
-    }
-  return false;
-}
-
-//----------------------------------------------------------------------------
 void cmFindCommon::InitializeSearchPathGroups()
 {
   std::vector<PathLabel>* labels;
@@ -107,18 +88,6 @@ void cmFindCommon::InitializeSearchPathGroups()
     cmSearchPath(this)));
   this->LabeledPaths.insert(std::make_pair(PathLabel::Guess,
     cmSearchPath(this)));
-
-  // Initialize global path options
-  this->NoDefaultPath = ListContains2Helper(this->Makefile,
-    "CMAKE_FIND_NO_DEFAULT_PATH", "ALL", this->CMakePathName);
-  this->NoCMakeEnvironmentPath = ListContains2Helper(this->Makefile,
-    "CMAKE_FIND_NO_CMAKE_ENVIRONMENT_PATH", "ALL", this->CMakePathName);
-  this->NoCMakePath = ListContains2Helper(this->Makefile,
-    "CMAKE_FIND_NO_CMAKE_PATH", "ALL", this->CMakePathName);
-  this->NoSystemEnvironmentPath = ListContains2Helper(this->Makefile,
-    "CMAKE_FIND_NO_SYSTEM_ENVIRONMENT_PATH", "ALL", this->CMakePathName);
-  this->NoCMakeSystemPath = ListContains2Helper(this->Makefile,
-    "CMAKE_FIND_NO_CMAKE_SYSTEM_PATH", "ALL", this->CMakePathName);
 }
 
 //----------------------------------------------------------------------------
@@ -340,8 +309,39 @@ void cmFindCommon::GetIgnoredPaths(std::set<std::string>& ignore)
 }
 
 //----------------------------------------------------------------------------
+inline bool ListContains2Helper(const cmMakefile* make,
+  const std::string& cmakeVar, const std::string& test1,
+  const std::string& test2)
+{
+  std::vector<std::string> v;
+  cmSystemTools::ExpandListArgument(
+    make->GetSafeDefinition(cmakeVar), v, true);
+  for(std::vector<std::string>::const_iterator i = v.begin();
+    i != v.end(); ++i)
+    {
+    if(*i == test1 || *i == test2)
+      {
+      return true;
+      }
+    }
+  return false;
+}
+
+//----------------------------------------------------------------------------
 bool cmFindCommon::CheckCommonArgument(std::string const& arg)
 {
+  // Initialize global path options
+  this->NoDefaultPath = ListContains2Helper(this->Makefile,
+    "CMAKE_FIND_NO_DEFAULT_PATH", "ALL", this->CMakePathName);
+  this->NoCMakeEnvironmentPath = ListContains2Helper(this->Makefile,
+    "CMAKE_FIND_NO_CMAKE_ENVIRONMENT_PATH", "ALL", this->CMakePathName);
+  this->NoCMakePath = ListContains2Helper(this->Makefile,
+    "CMAKE_FIND_NO_CMAKE_PATH", "ALL", this->CMakePathName);
+  this->NoSystemEnvironmentPath = ListContains2Helper(this->Makefile,
+    "CMAKE_FIND_NO_SYSTEM_ENVIRONMENT_PATH", "ALL", this->CMakePathName);
+  this->NoCMakeSystemPath = ListContains2Helper(this->Makefile,
+    "CMAKE_FIND_NO_CMAKE_SYSTEM_PATH", "ALL", this->CMakePathName);
+
   if(arg == "NO_DEFAULT_PATH")
     {
     this->NoDefaultPath = true;

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

Summary of changes:
 Source/cmFindCommon.cxx |   62 +++++++++++++++++++++++------------------------
 1 file changed, 31 insertions(+), 31 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list