summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2002-03-26 21:44:49 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2002-03-26 21:44:49 (GMT)
commitccbdc30a8c9c1f763efecf19a0f15f1d1b43e74f (patch)
treef79159505a04f097ccfed117d69610ff1988db30 /Source/cmSystemTools.cxx
parenta5b833119db2f76472dda7b7dd22b07b9113453e (diff)
downloadCMake-ccbdc30a8c9c1f763efecf19a0f15f1d1b43e74f.zip
CMake-ccbdc30a8c9c1f763efecf19a0f15f1d1b43e74f.tar.gz
CMake-ccbdc30a8c9c1f763efecf19a0f15f1d1b43e74f.tar.bz2
ENH: ExpandListArguments(): empty elements in semi-colon-separated string-list can now be ignored.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 5102fa2..6f34c8e 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1609,7 +1609,8 @@ void cmSystemTools::GlobDirs(const char *fullPath,
void cmSystemTools::ExpandListArguments(std::vector<std::string> const& arguments,
- std::vector<std::string>& newargs)
+ std::vector<std::string>& newargs,
+ bool ignore_empty)
{
std::vector<std::string>::const_iterator i;
for(i = arguments.begin();i != arguments.end(); ++i)
@@ -1630,7 +1631,10 @@ void cmSystemTools::ExpandListArguments(std::vector<std::string> const& argument
{
len = i->size()-start;
}
- newargs.push_back(i->substr(start, len));
+ if (ignore_empty == false || len > 0)
+ {
+ newargs.push_back(i->substr(start, len));
+ }
start = endpos+1;
}
}