[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1891-gf84fac0

Stephen Kelly steveire at gmail.com
Sun Feb 3 16:41:05 EST 2013


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  f84fac0b9a91a7d9fc61d0b25627fda430b8a1b3 (commit)
       via  c6289d9dde8a2ddeff96282acecad74baa7523b3 (commit)
       via  4085273945e4028c3dfda418c9b7ee43ed7b487b (commit)
      from  87450986d6ffb8624ebdaa6063f5cbcb8cebcdf3 (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=f84fac0b9a91a7d9fc61d0b25627fda430b8a1b3
commit f84fac0b9a91a7d9fc61d0b25627fda430b8a1b3
Merge: 8745098 c6289d9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Feb 3 16:41:04 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Feb 3 16:41:04 2013 -0500

    Merge topic 'tll-includes-defines' into next
    
    c6289d9 Avoid invoking IsOff and ConvertToUnixPaths for cached includes
    4085273 Initialize the HadContextSensitiveCondition


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6289d9dde8a2ddeff96282acecad74baa7523b3
commit c6289d9dde8a2ddeff96282acecad74baa7523b3
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Feb 3 22:39:01 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Feb 3 22:40:07 2013 +0100

    Avoid invoking IsOff and ConvertToUnixPaths for cached includes
    
    They seem to contribute a surprising amount to the cost of the
    function.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b52e483..1a6b7ce 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2779,8 +2779,15 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
       end = this->Internal->IncludeDirectoriesEntries.end();
       it != end; ++it)
     {
+
+    bool testIsOff = true;
+    bool cacheIncludes = false;
     std::vector<std::string> entryIncludes = (*it)->CachedIncludes;
-    if(entryIncludes.empty())
+    if(!entryIncludes.empty())
+      {
+      testIsOff = false;
+      }
+    else
       {
       cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(this->Makefile,
                                                 config,
@@ -2790,18 +2797,18 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
                                       entryIncludes);
       if (!(*it)->ge->GetHadContextSensitiveCondition())
         {
-        (*it)->CachedIncludes = entryIncludes;
+        cacheIncludes = true;
         }
       }
     std::string usedIncludes;
-    for(std::vector<std::string>::const_iterator
+    for(std::vector<std::string>::iterator
           li = entryIncludes.begin(); li != entryIncludes.end(); ++li)
       {
-      std::string inc = *li;
-      if (!cmSystemTools::IsOff(inc.c_str()))
+      if (testIsOff && !cmSystemTools::IsOff(li->c_str()))
         {
-        cmSystemTools::ConvertToUnixSlashes(inc);
+        cmSystemTools::ConvertToUnixSlashes(*li);
         }
+      std::string inc = *li;
 
       if(uniqueIncludes.insert(inc).second)
         {
@@ -2812,6 +2819,10 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
           }
         }
       }
+    if (cacheIncludes)
+      {
+      (*it)->CachedIncludes = entryIncludes;
+      }
     if (!usedIncludes.empty())
       {
       this->Makefile->GetCMakeInstance()->IssueMessage(cmake::LOG,

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4085273945e4028c3dfda418c9b7ee43ed7b487b
commit 4085273945e4028c3dfda418c9b7ee43ed7b487b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Feb 3 22:13:14 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Feb 3 22:40:07 2013 +0100

    Initialize the HadContextSensitiveCondition
    
    So there's some reasonable chance of using the optimization.

diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 86f331f..7add1bf 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -123,7 +123,8 @@ const char *cmCompiledGeneratorExpression::Evaluate(
 cmCompiledGeneratorExpression::cmCompiledGeneratorExpression(
               cmListFileBacktrace const& backtrace,
               const char *input)
-  : Backtrace(backtrace), Input(input ? input : "")
+  : Backtrace(backtrace), Input(input ? input : ""),
+    HadContextSensitiveCondition(false)
 {
   cmGeneratorExpressionLexer l;
   std::vector<cmGeneratorExpressionToken> tokens =

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

Summary of changes:
 Source/cmGeneratorExpression.cxx |    3 ++-
 Source/cmTarget.cxx              |   23 +++++++++++++++++------
 2 files changed, 19 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list