diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-11-20 20:40:29 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-11-27 18:06:12 (GMT) |
commit | 1242f4e56924ddfb7f954d820918c89c333e1dc5 (patch) | |
tree | b4f7d0437efd24e0508e9f998a082ff576c3c03c /Source | |
parent | 754b3212720d0846b1b5847fae888bc79bb8cfc3 (diff) | |
download | CMake-1242f4e56924ddfb7f954d820918c89c333e1dc5.zip CMake-1242f4e56924ddfb7f954d820918c89c333e1dc5.tar.gz CMake-1242f4e56924ddfb7f954d820918c89c333e1dc5.tar.bz2 |
Genex: Add {UPPER,LOWER}_CASE and MAKE_C_IDENTIFIER.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 17bf041..0f8c4e3 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -199,6 +199,48 @@ static const struct StrEqualNode : public cmGeneratorExpressionNode } strEqualNode; //---------------------------------------------------------------------------- +static const struct LowerCaseNode : public cmGeneratorExpressionNode +{ + LowerCaseNode() {} + + std::string Evaluate(const std::vector<std::string> ¶meters, + cmGeneratorExpressionContext *, + const GeneratorExpressionContent *, + cmGeneratorExpressionDAGChecker *) const + { + return cmSystemTools::LowerCase(parameters.front()); + } +} lowerCaseNode; + +//---------------------------------------------------------------------------- +static const struct UpperCaseNode : public cmGeneratorExpressionNode +{ + UpperCaseNode() {} + + std::string Evaluate(const std::vector<std::string> ¶meters, + cmGeneratorExpressionContext *, + const GeneratorExpressionContent *, + cmGeneratorExpressionDAGChecker *) const + { + return cmSystemTools::UpperCase(parameters.front()); + } +} upperCaseNode; + +//---------------------------------------------------------------------------- +static const struct MakeCIdentifierNode : public cmGeneratorExpressionNode +{ + MakeCIdentifierNode() {} + + std::string Evaluate(const std::vector<std::string> ¶meters, + cmGeneratorExpressionContext *, + const GeneratorExpressionContent *, + cmGeneratorExpressionDAGChecker *) const + { + return cmSystemTools::MakeCidentifier(parameters.front().c_str()); + } +} makeCIdentifierNode; + +//---------------------------------------------------------------------------- static const struct Angle_RNode : public cmGeneratorExpressionNode { Angle_RNode() {} @@ -1442,6 +1484,12 @@ cmGeneratorExpressionNode* GetNode(const std::string &identifier) return &targetSoNameFileDirNode; else if (identifier == "STREQUAL") return &strEqualNode; + else if (identifier == "LOWER_CASE") + return &lowerCaseNode; + else if (identifier == "UPPER_CASE") + return &upperCaseNode; + else if (identifier == "MAKE_C_IDENTIFIER") + return &makeCIdentifierNode; else if (identifier == "BOOL") return &boolNode; else if (identifier == "ANGLE-R") |