Commit ccbdc30a authored by Sebastien Barre's avatar Sebastien Barre
Browse files

ENH: ExpandListArguments(): empty elements in semi-colon-separated string-list can now be ignored.

parent a5b83311
......@@ -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;
}
}
......
......@@ -48,7 +48,8 @@ public:
* containing the expanded versions of all arguments in argsIn.
*/
static void ExpandListArguments(std::vector<std::string> const& argsIn,
std::vector<std::string>& argsOut);
std::vector<std::string>& argsOut,
bool ignore_empty = false);
/**
* Look for and replace registry values in a string
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment