[Cmake-commits] CMake branch, next, updated. v2.8.12.2-1741-g237a398

Ben Boeckel ben.boeckel at kitware.com
Tue Feb 25 13:25:59 EST 2014


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  237a3983b08ca19de72a56652632cdafaa6f7413 (commit)
       via  745fa13416731e686337f4095c05c8d85a1e6c18 (commit)
       via  880b9e744ebf8a0c3b9ed24e0b075753920fcf01 (commit)
      from  63a0ac2d64e965b39588732fefdfc99508af0e20 (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=237a3983b08ca19de72a56652632cdafaa6f7413
commit 237a3983b08ca19de72a56652632cdafaa6f7413
Merge: 63a0ac2 745fa13
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Tue Feb 25 13:25:58 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Feb 25 13:25:58 2014 -0500

    Merge topic 'dev/faster-evis' into next
    
    745fa134 tests: Update CMP0052 expected output
    880b9e74 EVIS: Output the difference when making a warning


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=745fa13416731e686337f4095c05c8d85a1e6c18
commit 745fa13416731e686337f4095c05c8d85a1e6c18
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Tue Feb 25 13:25:35 2014 -0500
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Tue Feb 25 13:25:35 2014 -0500

    tests: Update CMP0052 expected output

diff --git a/Tests/RunCMake/CMP0052/CMP0052-At-NEW-stderr.txt b/Tests/RunCMake/CMP0052/CMP0052-At-NEW-stderr.txt
index cbd1be4..e3e5332 100644
--- a/Tests/RunCMake/CMP0052/CMP0052-At-NEW-stderr.txt
+++ b/Tests/RunCMake/CMP0052/CMP0052-At-NEW-stderr.txt
@@ -1 +1 @@
--->\${right}<--
+^-->\${right}<--$
diff --git a/Tests/RunCMake/CMP0052/CMP0052-At-OLD-stderr.txt b/Tests/RunCMake/CMP0052/CMP0052-At-OLD-stderr.txt
index 5dcd4d7..acfa30a 100644
--- a/Tests/RunCMake/CMP0052/CMP0052-At-OLD-stderr.txt
+++ b/Tests/RunCMake/CMP0052/CMP0052-At-OLD-stderr.txt
@@ -1 +1 @@
--->wrong<--
+^-->wrong<--$
diff --git a/Tests/RunCMake/CMP0052/CMP0052-At-WARN-stderr.txt b/Tests/RunCMake/CMP0052/CMP0052-At-WARN-stderr.txt
index a5f0537..78315a8 100644
--- a/Tests/RunCMake/CMP0052/CMP0052-At-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0052/CMP0052-At-WARN-stderr.txt
@@ -1,7 +1,11 @@
-CMake Warning \(dev\) at CMP0052-At-WARN.cmake:4 \(set\):
+^CMake Warning \(dev\) at CMP0052-At-WARN.cmake:4 \(set\):
   Policy CMP0052 is not set: Use the new variable expansion rules.  Run
   "cmake --help-policy CMP0052" for policy details.  Use the cmake_policy
   command to set the policy and suppress this warning.
+
+    Input: '@var@'
+    Old expansion: '\${right}'
+    New expansion: '@var@'
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
+This warning is for project developers.  Use -Wno-dev to suppress it.$

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=880b9e744ebf8a0c3b9ed24e0b075753920fcf01
commit 880b9e744ebf8a0c3b9ed24e0b075753920fcf01
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Tue Feb 25 13:24:07 2014 -0500
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Tue Feb 25 13:25:10 2014 -0500

    EVIS: Output the difference when making a warning

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index f3ffae6..9263df8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2542,6 +2542,7 @@ const char *cmMakefile::ExpandVariablesInString(std::string& source,
   bool compareResults = false;
   cmake::MessageType mtype = cmake::LOG;
   std::string errorstr;
+  std::string original;
 
   // Sanity check the @ONLY mode.
   if(atOnly && (!noEscapes || !removeEmpty))
@@ -2556,13 +2557,15 @@ const char *cmMakefile::ExpandVariablesInString(std::string& source,
 
   // Variables used in the WARN case.
   std::string newResult;
+  std::string newErrorstr;
   cmake::MessageType newError = cmake::LOG;
 
   switch(this->GetPolicyStatus(cmPolicies::CMP0052))
     {
     case cmPolicies::WARN:
       {
-      std::string newErrorstr;
+      // Save the original string for the warning.
+      original = source;
       newResult = source;
       compareResults = true;
       newError =
@@ -2585,6 +2588,7 @@ const char *cmMakefile::ExpandVariablesInString(std::string& source,
       break;
     }
 
+  // If it's an error in either case, just report the error...
   if(mtype != cmake::LOG)
     {
     if(mtype == cmake::FATAL_ERROR)
@@ -2593,10 +2597,24 @@ const char *cmMakefile::ExpandVariablesInString(std::string& source,
       }
     this->IssueMessage(mtype, errorstr);
     }
+  // ...otherwise, see if there's a difference that needs to be warned about.
   else if(compareResults && (newResult != source || newError != mtype))
     {
-    this->IssueMessage(cmake::AUTHOR_WARNING,
-        this->GetPolicies()->GetPolicyWarning(cmPolicies::CMP0052));
+    std::string message =
+      this->GetPolicies()->GetPolicyWarning(cmPolicies::CMP0052);
+    message += "\n  Input: \'" + original + "\'";
+    if(newError != mtype)
+      {
+      message += "\n  Old behavior is accepted and "
+                 "the new behavior causes an error: "
+                 "\'" + newErrorstr + "\'";
+      }
+    else
+      {
+      message += "\n  Old expansion: \'" + source + "\'";
+      message += "\n  New expansion: \'" + newResult + "\'";
+      }
+    this->IssueMessage(cmake::AUTHOR_WARNING, message);
     }
 
   return source.c_str();

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

Summary of changes:
 Source/cmMakefile.cxx                             |   24 ++++++++++++++++++---
 Tests/RunCMake/CMP0052/CMP0052-At-NEW-stderr.txt  |    2 +-
 Tests/RunCMake/CMP0052/CMP0052-At-OLD-stderr.txt  |    2 +-
 Tests/RunCMake/CMP0052/CMP0052-At-WARN-stderr.txt |    8 +++++--
 4 files changed, 29 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list