summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-03-04 20:40:14 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-03-04 20:40:14 (GMT)
commit91d86838a93cde26b4eca23faee50c6ffc1a202d (patch)
tree31151f4b8feaf0bd9d20da13207db7775d3b2666
parent8106570606e79c8800eab048e7fcccba2c4ebee9 (diff)
parentf93a388c9c65ae9c8f74055e18ddf85be10a8a34 (diff)
downloadCMake-91d86838a93cde26b4eca23faee50c6ffc1a202d.zip
CMake-91d86838a93cde26b4eca23faee50c6ffc1a202d.tar.gz
CMake-91d86838a93cde26b4eca23faee50c6ffc1a202d.tar.bz2
Merge topic 'fix-genex-split-duplication'
f93a388 Fix the cmGeneratorExpression::Split when leading chars are present.
-rw-r--r--Source/cmGeneratorExpression.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 34d80ec..7ea58fa 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -302,12 +302,20 @@ void cmGeneratorExpression::Split(const std::string &input,
if (!part.empty())
{
std::string::size_type startPos = input.rfind(";", pos);
- if (startPos != pos - 1 && startPos >= lastPos)
+ if (startPos == std::string::npos)
+ {
+ preGenex = part;
+ part = "";
+ }
+ else if (startPos != pos - 1 && startPos >= lastPos)
{
part = input.substr(lastPos, startPos - lastPos);
preGenex = input.substr(startPos + 1, pos - startPos - 1);
}
- cmSystemTools::ExpandListArgument(part.c_str(), output);
+ if(!part.empty())
+ {
+ cmSystemTools::ExpandListArgument(part.c_str(), output);
+ }
}
pos += 2;
int nestingLevel = 1;