[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2474-gc782040

Brad King brad.king at kitware.com
Tue Mar 12 16:47:48 EDT 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  c7820400d2d01f2853f8e1115f4c275b95236be0 (commit)
       via  7f3bb8b39234766b48e0dd18a47ed46d6fa176e6 (commit)
      from  e92519185b928e7952d92e5c81f4da25d9a68358 (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=c7820400d2d01f2853f8e1115f4c275b95236be0
commit c7820400d2d01f2853f8e1115f4c275b95236be0
Merge: e925191 7f3bb8b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Mar 12 16:47:45 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Mar 12 16:47:45 2013 -0400

    Merge topic 'genex-SEMICOLON' into next
    
    7f3bb8b Add $<SEMICOLON> generator expression.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f3bb8b39234766b48e0dd18a47ed46d6fa176e6
commit 7f3bb8b39234766b48e0dd18a47ed46d6fa176e6
Author:     Jean-Christophe Fillion-Robin <jchris.fillionr at kitware.com>
AuthorDate: Tue Mar 12 02:52:01 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Mar 12 16:46:03 2013 -0400

    Add $<SEMICOLON> generator expression.
    
    This expression is useful to put a ';' in a command line argument
    without dividing the argument during CMake list expansion.

diff --git a/Source/cmDocumentGeneratorExpressions.h b/Source/cmDocumentGeneratorExpressions.h
index 76a60c3..6cc3f25 100644
--- a/Source/cmDocumentGeneratorExpressions.h
+++ b/Source/cmDocumentGeneratorExpressions.h
@@ -26,6 +26,8 @@
   "strings which contain a '>' for example.\n"                          \
   "  $<COMMA>                  = A literal ','. Used to compare "       \
   "strings which contain a ',' for example.\n"                          \
+  "  $<SEMICOLON>              = A literal ';'. Used to prevent "       \
+  "list expansion on an argument with ';'.\n"                           \
   "  $<TARGET_NAME:...>        = Marks ... as being the name of a "     \
   "target.  This is required if exporting targets to multiple "         \
   "dependent export sets.  The '...' must be a literal name of a "      \
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index e2d8777..6618e83 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -227,6 +227,22 @@ static const struct CommaNode : public cmGeneratorExpressionNode
 } commaNode;
 
 //----------------------------------------------------------------------------
+static const struct SemicolonNode : public cmGeneratorExpressionNode
+{
+  SemicolonNode() {}
+
+  virtual int NumExpectedParameters() const { return 0; }
+
+  std::string Evaluate(const std::vector<std::string> &,
+                       cmGeneratorExpressionContext *,
+                       const GeneratorExpressionContent *,
+                       cmGeneratorExpressionDAGChecker *) const
+  {
+    return ";";
+  }
+} semicolonNode;
+
+//----------------------------------------------------------------------------
 static const struct ConfigurationNode : public cmGeneratorExpressionNode
 {
   ConfigurationNode() {}
@@ -943,6 +959,8 @@ cmGeneratorExpressionNode* GetNode(const std::string &identifier)
     return &angle_rNode;
   else if (identifier == "COMMA")
     return &commaNode;
+  else if (identifier == "SEMICOLON")
+    return &semicolonNode;
   else if (identifier == "TARGET_PROPERTY")
     return &targetPropertyNode;
   else if (identifier == "TARGET_NAME")
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index fff7c87..0008c16 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -47,11 +47,13 @@ add_custom_target(check-part1 ALL
     -Dtest_strequal_no_yes=$<STREQUAL:No,Yes>
     -Dtest_strequal_angle_r=$<STREQUAL:$<ANGLE-R>,$<ANGLE-R>>
     -Dtest_strequal_comma=$<STREQUAL:$<COMMA>,$<COMMA>>
+    -Dtest_strequal_semicolon=$<STREQUAL:$<SEMICOLON>,$<SEMICOLON>>
     -Dtest_strequal_angle_r_comma=$<STREQUAL:$<ANGLE-R>,$<COMMA>>
     -Dtest_strequal_both_empty=$<STREQUAL:,>
     -Dtest_strequal_one_empty=$<STREQUAL:something,>
     -Dtest_angle_r=$<ANGLE-R>
     -Dtest_comma=$<COMMA>
+    -Dtest_semicolon=$<SEMICOLON>
     -Dtest_colons_1=$<1::>
     -Dtest_colons_2=$<1:::>
     -Dtest_colons_3=$<1:Qt5::Core>
diff --git a/Tests/GeneratorExpression/check-part1.cmake b/Tests/GeneratorExpression/check-part1.cmake
index 7abfa82..9bef159 100644
--- a/Tests/GeneratorExpression/check-part1.cmake
+++ b/Tests/GeneratorExpression/check-part1.cmake
@@ -44,11 +44,13 @@ check(test_strequal_yes_no "0")
 check(test_strequal_no_yes "0")
 check(test_strequal_angle_r "1")
 check(test_strequal_comma "1")
+check(test_strequal_semicolon "1")
 check(test_strequal_angle_r_comma "0")
 check(test_strequal_both_empty "1")
 check(test_strequal_one_empty "0")
 check(test_angle_r ">")
 check(test_comma ",")
+check(test_semicolon ";")
 check(test_colons_1 ":")
 check(test_colons_2 "::")
 check(test_colons_3 "Qt5::Core")

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

Summary of changes:
 Source/cmDocumentGeneratorExpressions.h     |    2 ++
 Source/cmGeneratorExpressionEvaluator.cxx   |   18 ++++++++++++++++++
 Tests/GeneratorExpression/CMakeLists.txt    |    2 ++
 Tests/GeneratorExpression/check-part1.cmake |    2 ++
 4 files changed, 24 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list