summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorJean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>2013-03-12 06:52:01 (GMT)
committerBrad King <brad.king@kitware.com>2013-03-12 20:46:03 (GMT)
commit7f3bb8b39234766b48e0dd18a47ed46d6fa176e6 (patch)
treee5530f01045cd27a1f357841f3008a7e5cff010f /Source/cmGeneratorExpressionEvaluator.cxx
parent153242601e22d6f06e1f14dc55d70c2a42b2ec5f (diff)
downloadCMake-7f3bb8b39234766b48e0dd18a47ed46d6fa176e6.zip
CMake-7f3bb8b39234766b48e0dd18a47ed46d6fa176e6.tar.gz
CMake-7f3bb8b39234766b48e0dd18a47ed46d6fa176e6.tar.bz2
Add $<SEMICOLON> generator expression.
This expression is useful to put a ';' in a command line argument without dividing the argument during CMake list expansion.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx18
1 files changed, 18 insertions, 0 deletions
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")