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.
This commit is contained in:
commit
8dbe39c6c7
|
@ -299,7 +299,7 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
|
||||||
std::string name = *parameters.begin();
|
std::string name = *parameters.begin();
|
||||||
|
|
||||||
cmsys::RegularExpression targetValidator;
|
cmsys::RegularExpression targetValidator;
|
||||||
targetValidator.compile("^[A-Za-z0-9_]+$");
|
targetValidator.compile("^[A-Za-z0-9_.-]+$");
|
||||||
if (!targetValidator.find(name.c_str()))
|
if (!targetValidator.find(name.c_str()))
|
||||||
{
|
{
|
||||||
::reportError(context, content->GetOriginalExpression(),
|
::reportError(context, content->GetOriginalExpression(),
|
||||||
|
|
|
@ -127,6 +127,11 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
|
||||||
parameters.resize(parameters.size() + 1);
|
parameters.resize(parameters.size() + 1);
|
||||||
++this->it;
|
++this->it;
|
||||||
}
|
}
|
||||||
|
if (this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
|
||||||
|
{
|
||||||
|
extendText(*(parameters.end() - 1), this->it);
|
||||||
|
++this->it;
|
||||||
|
}
|
||||||
if (this->it == this->Tokens.end())
|
if (this->it == this->Tokens.end())
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue