summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionParser.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-11-26 21:44:13 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-27 14:12:39 (GMT)
commitb581be07672e08cce4c29fa279b250d8e9c7aaba (patch)
treea6aa4eec9c567567af1ec798006925987500b9d9 /Source/cmGeneratorExpressionParser.cxx
parent07749e3705cfc0105399c4a7a8349ec9f83ba39c (diff)
downloadCMake-b581be07672e08cce4c29fa279b250d8e9c7aaba.zip
CMake-b581be07672e08cce4c29fa279b250d8e9c7aaba.tar.gz
CMake-b581be07672e08cce4c29fa279b250d8e9c7aaba.tar.bz2
Genex: Don't segfault on $<FOO,>
Treat the comma as part of the identifier here. It will later not resolve to a generator expression and the user gets a proper error message.
Diffstat (limited to 'Source/cmGeneratorExpressionParser.cxx')
-rw-r--r--Source/cmGeneratorExpressionParser.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpressionParser.cxx b/Source/cmGeneratorExpressionParser.cxx
index 7a8fc51..a619cec 100644
--- a/Source/cmGeneratorExpressionParser.cxx
+++ b/Source/cmGeneratorExpressionParser.cxx
@@ -88,7 +88,15 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
while(this->it->TokenType != cmGeneratorExpressionToken::EndExpression
&& this->it->TokenType != cmGeneratorExpressionToken::ColonSeparator)
{
- this->ParseContent(identifier);
+ if (this->it->TokenType == cmGeneratorExpressionToken::CommaSeparator)
+ {
+ extendText(identifier, this->it);
+ ++this->it;
+ }
+ else
+ {
+ this->ParseContent(identifier);
+ }
if (this->it == this->Tokens.end())
{
break;