[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6450-gfe8b728

Stephen Kelly steveire at gmail.com
Sun Dec 29 03:47:44 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  fe8b7287a102d2766d86f11c3ee8d0380d683d43 (commit)
       via  e2c84c2c8bde1d9e8d7085b13ffe06fecdeb18b0 (commit)
       via  acf423b23c71d46c09c9c36b3a9dc19b038d07ad (commit)
      from  b176028b63d471ccdefab4511e21a8493c85ce6f (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=fe8b7287a102d2766d86f11c3ee8d0380d683d43
commit fe8b7287a102d2766d86f11c3ee8d0380d683d43
Merge: b176028 e2c84c2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Dec 29 03:47:42 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Dec 29 03:47:42 2013 -0500

    Merge topic 'genex-numerics' into next
    
    e2c84c2 Report invalid content.
    acf423b Handle sign.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e2c84c2c8bde1d9e8d7085b13ffe06fecdeb18b0
commit e2c84c2c8bde1d9e8d7085b13ffe06fecdeb18b0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Dec 27 13:35:38 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Dec 28 19:05:38 2013 +0100

    Report invalid content.

diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 4225f52..83d341e 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -236,7 +236,7 @@ static const struct EqualNode : public cmGeneratorExpressionNode
     if (pEnd == lhs || *pEnd != '\0' || errno == ERANGE)
       {
       reportError(context, content->GetOriginalExpression(),
-            "$<EQUAL> parameter not a valid integer.");
+          "$<EQUAL> parameter " + parameters[0] + " is not a valid integer.");
       return std::string();
       }
 
@@ -270,7 +270,7 @@ static const struct EqualNode : public cmGeneratorExpressionNode
     if (pEnd == rhs || *pEnd != '\0' || errno == ERANGE)
       {
       reportError(context, content->GetOriginalExpression(),
-            "$<EQUAL> parameter not a valid integer.");
+          "$<EQUAL> parameter " + parameters[1] + " is not a valid integer.");
       return std::string();
       }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=acf423b23c71d46c09c9c36b3a9dc19b038d07ad
commit acf423b23c71d46c09c9c36b3a9dc19b038d07ad
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Dec 27 13:28:53 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Dec 27 13:32:31 2013 +0100

    Handle sign.

diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 0b37198..4225f52 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -212,6 +212,7 @@ static const struct EqualNode : public cmGeneratorExpressionNode
     char *pEnd;
 
     int base = 0;
+    bool flipSign = false;
 
     const char *lhs = parameters[0].c_str();
     if (cmHasLiteralPrefix(lhs, "0b"))
@@ -219,6 +220,17 @@ static const struct EqualNode : public cmGeneratorExpressionNode
       base = 2;
       lhs += 2;
       }
+    if (cmHasLiteralPrefix(lhs, "-0b"))
+      {
+      base = 2;
+      lhs += 3;
+      flipSign = true;
+      }
+    if (cmHasLiteralPrefix(lhs, "+0b"))
+      {
+      base = 2;
+      lhs += 3;
+      }
 
     long lnum = strtol(lhs, &pEnd, base);
     if (pEnd == lhs || *pEnd != '\0' || errno == ERANGE)
@@ -228,7 +240,13 @@ static const struct EqualNode : public cmGeneratorExpressionNode
       return std::string();
       }
 
+    if (flipSign)
+      {
+      lnum = -lnum;
+      }
+
     base = 0;
+    flipSign = false;
 
     const char *rhs = parameters[1].c_str();
     if (cmHasLiteralPrefix(rhs, "0b"))
@@ -236,6 +254,17 @@ static const struct EqualNode : public cmGeneratorExpressionNode
       base = 2;
       rhs += 2;
       }
+    if (cmHasLiteralPrefix(rhs, "-0b"))
+      {
+      base = 2;
+      rhs += 3;
+      flipSign = true;
+      }
+    if (cmHasLiteralPrefix(rhs, "+0b"))
+      {
+      base = 2;
+      rhs += 3;
+      }
 
     long rnum = strtol(rhs, &pEnd, base);
     if (pEnd == rhs || *pEnd != '\0' || errno == ERANGE)
@@ -245,6 +274,11 @@ static const struct EqualNode : public cmGeneratorExpressionNode
       return std::string();
       }
 
+    if (flipSign)
+      {
+      rnum = -rnum;
+      }
+
     return lnum == rnum ? "1" : "0";
   }
 } equalNode;
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index df896c4..4fb7ecd 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -206,6 +206,17 @@ add_custom_target(check-part3 ALL
     -Dequal8=$<EQUAL:10,012>
     -Dequal9=$<EQUAL:10,010>
     -Dequal10=$<EQUAL:10,0b1010>
+    -Dequal11=$<EQUAL:-10,-0xa>
+    -Dequal12=$<EQUAL:10,+0xa>
+    -Dequal13=$<EQUAL:+10,+0xa>
+    -Dequal14=$<EQUAL:+10,0xa>
+    -Dequal15=$<EQUAL:-10,-0xa>
+    -Dequal16=$<EQUAL:-10,-0b1010>
+    -Dequal17=$<EQUAL:-10,+0b1010>
+    -Dequal18=$<EQUAL:10,+0b1010>
+    -Dequal19=$<EQUAL:10,+012>
+    -Dequal20=$<EQUAL:10,-012>
+    -Dequal21=$<EQUAL:-10,-012>
     -P ${CMAKE_CURRENT_SOURCE_DIR}/check-part3.cmake
   COMMAND ${CMAKE_COMMAND} -E echo "check done (part 3 of 3)"
   VERBATIM
diff --git a/Tests/GeneratorExpression/check-part3.cmake b/Tests/GeneratorExpression/check-part3.cmake
index 60e6c94..2c6bf49 100644
--- a/Tests/GeneratorExpression/check-part3.cmake
+++ b/Tests/GeneratorExpression/check-part3.cmake
@@ -47,3 +47,14 @@ check(equal7 "1")
 check(equal8 "1")
 check(equal9 "0")
 check(equal10 "1")
+check(equal11 "1")
+check(equal12 "1")
+check(equal13 "1")
+check(equal14 "1")
+check(equal15 "1")
+check(equal16 "1")
+check(equal17 "0")
+check(equal18 "1")
+check(equal19 "1")
+check(equal20 "0")
+check(equal21 "1")

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

Summary of changes:
 Source/cmGeneratorExpressionEvaluator.cxx   |   38 +++++++++++++++++++++++++-
 Tests/GeneratorExpression/CMakeLists.txt    |   11 ++++++++
 Tests/GeneratorExpression/check-part3.cmake |   11 ++++++++
 3 files changed, 58 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list