diff options
author | David Cole <david.cole@kitware.com> | 2012-09-25 19:17:45 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-09-25 19:17:45 (GMT) |
commit | 8dbe39c6c7614b64aebe9a66eb96b8158b75643c (patch) | |
tree | e81f2609b21a759b3ad81149d98e8f9b3287e9d2 | |
parent | 8e29b375c415a77b41e41b3d98cb6e66aad3e2d5 (diff) | |
parent | f20af79956bff9ddd0bf428a2731b9c817de93a1 (diff) | |
download | CMake-8dbe39c6c7614b64aebe9a66eb96b8158b75643c.zip CMake-8dbe39c6c7614b64aebe9a66eb96b8158b75643c.tar.gz CMake-8dbe39c6c7614b64aebe9a66eb96b8158b75643c.tar.bz2 |
Merge topic 'generator-expression-refactor'
f20af79 Handle colons as a special case in the generator expression parser.
fb578c8 Fix the regular expression validator for target names.
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionParser.cxx | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index acc844a..9f84ed2 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -299,7 +299,7 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode std::string name = *parameters.begin(); cmsys::RegularExpression targetValidator; - targetValidator.compile("^[A-Za-z0-9_]+$"); + targetValidator.compile("^[A-Za-z0-9_.-]+$"); if (!targetValidator.find(name.c_str())) { ::reportError(context, content->GetOriginalExpression(), diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx index 2a5cc7a..d3c4aa3 100644 --- a/Source/cmGeneratorExpressionParser.cxx +++ b/Source/cmGeneratorExpressionParser.cxx @@ -127,6 +127,11 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression( parameters.resize(parameters.size() + 1); ++this->it; } + if (this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator) + { + extendText(*(parameters.end() - 1), this->it); + ++this->it; + } if (this->it == this->Tokens.end()) { break; |