[Cmake-commits] CMake branch, next, updated. v3.5.1-685-ga2d1f4c

Brad King brad.king at kitware.com
Tue Mar 29 10:18:44 EDT 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  a2d1f4c6d990cecc9ce724758eabdb0e77d1e7a8 (commit)
       via  2379b3ae3171db7277fd3cf126b5b0c298231b83 (commit)
       via  02fce523a13c8e4cda0c95334b480bb87336ed1c (commit)
      from  540a816a6c02d6b1fc9f34632b7e2a5ba9422768 (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=a2d1f4c6d990cecc9ce724758eabdb0e77d1e7a8
commit a2d1f4c6d990cecc9ce724758eabdb0e77d1e7a8
Merge: 540a816 2379b3a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Mar 29 10:18:44 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Mar 29 10:18:44 2016 -0400

    Merge topic 'simplify-condition-context' into next
    
    2379b3ae cmConditionEvaluator: Remove GetConditionContext method
    02fce523 cmConditionEvaluator: Drop unnecessary path conversion


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2379b3ae3171db7277fd3cf126b5b0c298231b83
commit 2379b3ae3171db7277fd3cf126b5b0c298231b83
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Mar 29 10:01:55 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Mar 29 10:10:20 2016 -0400

    cmConditionEvaluator: Remove GetConditionContext method
    
    All it does is call cmListFileContext::FromCommandContext, so move this
    to the call sites.

diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index 4bfe697..5d06f40 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -104,18 +104,6 @@ bool cmConditionEvaluator::IsTrue(
     errorString, status, true);
 }
 
-cmListFileContext cmConditionEvaluator::GetConditionContext(
-    cmMakefile*,
-    const cmCommandContext& command,
-    const std::string& filePath)
-{
-  cmListFileContext context =
-      cmListFileContext::FromCommandContext(
-        command,
-        filePath);
-  return context;
-}
-
 //=========================================================================
 const char* cmConditionEvaluator::GetDefinitionIfUnquoted(
   cmExpandedCommandArgument const& argument) const
diff --git a/Source/cmConditionEvaluator.h b/Source/cmConditionEvaluator.h
index 8600825..3ed512d 100644
--- a/Source/cmConditionEvaluator.h
+++ b/Source/cmConditionEvaluator.h
@@ -33,9 +33,6 @@ public:
       std::string &errorString,
       cmake::MessageType &status);
 
-  static cmListFileContext GetConditionContext(cmMakefile* mf,
-      const cmCommandContext& command, std::string const& filePath);
-
 private:
   // Filter the given variable definition based on policy CMP0054.
   const char* GetDefinitionIfUnquoted(
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 5964ef1..9a07dde 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -108,8 +108,8 @@ IsFunctionBlocked(const cmListFileFunction& lff,
             cmake::MessageType messType;
 
             cmListFileContext conditionContext =
-                cmConditionEvaluator::GetConditionContext(
-                  &mf, this->Functions[c],
+                cmListFileContext::FromCommandContext(
+                  this->Functions[c],
                   this->GetStartingContext().FilePath);
 
             cmConditionEvaluator conditionEvaluator(
@@ -210,8 +210,8 @@ bool cmIfCommand
   commandContext.Name = execContext.Name;
 
   cmConditionEvaluator conditionEvaluator(
-        *(this->Makefile), cmConditionEvaluator::GetConditionContext(
-          this->Makefile, commandContext, execContext.FilePath),
+        *(this->Makefile), cmListFileContext::FromCommandContext(
+          commandContext, execContext.FilePath),
         this->Makefile->GetBacktrace());
 
   bool isTrue = conditionEvaluator.IsTrue(
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx
index 4b7afd8..aabbe27 100644
--- a/Source/cmWhileCommand.cxx
+++ b/Source/cmWhileCommand.cxx
@@ -56,8 +56,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
       commandContext.Name = execContext.Name;
 
       cmListFileContext conditionContext =
-          cmConditionEvaluator::GetConditionContext(
-            &mf, commandContext,
+          cmListFileContext::FromCommandContext(
+            commandContext,
             this->GetStartingContext().FilePath);
 
       cmConditionEvaluator conditionEvaluator(

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=02fce523a13c8e4cda0c95334b480bb87336ed1c
commit 02fce523a13c8e4cda0c95334b480bb87336ed1c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Mar 29 10:01:40 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Mar 29 10:02:17 2016 -0400

    cmConditionEvaluator: Drop unnecessary path conversion
    
    In commit v3.4.0-rc2~1^2 (cmIfCommand: Issue CMP0054 warning with
    appropriate context, 2015-10-20) we added construction of a
    cmListFileContext with conversion of the calling file path.  This code
    path runs on every condition (e.g. `if()`) and so the path conversion
    has a noticeable performance cost.  Fortunately the only use of this
    context is for insertion into cmMakefile::CMP0054ReportedIds so we do
    not need to convert the path.  Simply drop the conversion.

diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index 6a0ebec..4bfe697 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -105,7 +105,7 @@ bool cmConditionEvaluator::IsTrue(
 }
 
 cmListFileContext cmConditionEvaluator::GetConditionContext(
-    cmMakefile* mf,
+    cmMakefile*,
     const cmCommandContext& command,
     const std::string& filePath)
 {
@@ -113,13 +113,6 @@ cmListFileContext cmConditionEvaluator::GetConditionContext(
       cmListFileContext::FromCommandContext(
         command,
         filePath);
-
-  if(!mf->GetCMakeInstance()->GetIsInTryCompile())
-    {
-    cmOutputConverter converter(mf->GetStateSnapshot());
-    context.FilePath = converter.Convert(context.FilePath,
-                                         cmOutputConverter::HOME);
-    }
   return context;
 }
 

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

Summary of changes:
 Source/cmConditionEvaluator.cxx |   19 -------------------
 Source/cmConditionEvaluator.h   |    3 ---
 Source/cmIfCommand.cxx          |    8 ++++----
 Source/cmWhileCommand.cxx       |    4 ++--
 4 files changed, 6 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list