[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1232-g8373fab

Brad King brad.king at kitware.com
Thu Dec 6 10:28:16 EST 2012


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  8373fab93a51952fadd8d965905ce0eabf22f2a4 (commit)
       via  c917a91c4d7725cd7f77ec5ad01eaf56e7ea175c (commit)
      from  4c654ef46b1e13e8a08e6e17070d95a247152143 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8373fab93a51952fadd8d965905ce0eabf22f2a4
commit 8373fab93a51952fadd8d965905ce0eabf22f2a4
Merge: 4c654ef c917a91
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 6 10:27:18 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Dec 6 10:27:18 2012 -0500

    Merge topic 'fix-ExpandVariables-performance' into next
    
    c917a91 Revert "Try to avoid calling ExpandVariablesInString where not needed."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c917a91c4d7725cd7f77ec5ad01eaf56e7ea175c
commit c917a91c4d7725cd7f77ec5ad01eaf56e7ea175c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 6 08:12:33 2012 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 6 08:12:33 2012 -0500

    Revert "Try to avoid calling ExpandVariablesInString where not needed."
    
    This reverts commit 5a9bca6c9a22575c76af86dce440929856de1f40.
    We will use another approach.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4396740..8498d72 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2122,13 +2122,6 @@ void cmMakefile::AddExtraDirectory(const char* dir)
   this->AuxSourceDirectories.push_back(dir);
 }
 
-//----------------------------------------------------------------------------
-static bool containsVariable(const std::string &lib)
-{
-  const std::string::size_type openpos = lib.find("${");
-  return (openpos != std::string::npos)
-      && (lib.find("}", openpos) != std::string::npos);
-}
 
 // expand CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR in the
 // include and library directories.
@@ -2143,11 +2136,8 @@ void cmMakefile::ExpandVariables()
   if (includeDirs)
     {
     std::string dirs = includeDirs;
-    if (containsVariable(dirs))
-      {
-      this->ExpandVariablesInString(dirs, true, true);
-      this->SetProperty("INCLUDE_DIRECTORIES", dirs.c_str());
-      }
+    this->ExpandVariablesInString(dirs, true, true);
+    this->SetProperty("INCLUDE_DIRECTORIES", dirs.c_str());
     }
 
   // Also for each target's INCLUDE_DIRECTORIES property:
@@ -2159,17 +2149,8 @@ void cmMakefile::ExpandVariables()
     if (includeDirs)
       {
       std::string dirs = includeDirs;
-      if (containsVariable(dirs))
-        {
-        // Performance suffers severely when ExpandVariablesInString
-        // is called on strings which contain generator expressions,
-        // presumably because they contain '$' characters.
-        // This expansion is only for compatibility, probably with ancient
-        // cmake versions. Usually the variables are already expanded
-        // so this branch will not be entered.
-        this->ExpandVariablesInString(dirs, true, true);
-        t.SetProperty("INCLUDE_DIRECTORIES", dirs.c_str());
-        }
+      this->ExpandVariablesInString(dirs, true, true);
+      t.SetProperty("INCLUDE_DIRECTORIES", dirs.c_str());
       }
     }
 

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

Summary of changes:
 Source/cmMakefile.cxx |   27 ++++-----------------------
 1 files changed, 4 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list