summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-02-10 00:03:27 (GMT)
committerBrad King <brad.king@kitware.com>2006-02-10 00:03:27 (GMT)
commitdb0681d2f6368fa703253f19ce1b00baad2c9757 (patch)
treef697dfd6623cc8a31bd1b1df0020cdf6615f760c /Source/cmSystemTools.cxx
parent1b5e3f41369e8bf6a43c79eb62a4d636caab2b5a (diff)
downloadCMake-db0681d2f6368fa703253f19ce1b00baad2c9757.zip
CMake-db0681d2f6368fa703253f19ce1b00baad2c9757.tar.gz
CMake-db0681d2f6368fa703253f19ce1b00baad2c9757.tar.bz2
ENH: Adding option to return empty arguments when expanding a list.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 52032f0..1bee080 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -973,10 +973,11 @@ void cmSystemTools::ExpandList(std::vector<std::string> const& arguments,
}
void cmSystemTools::ExpandListArgument(const std::string& arg,
- std::vector<std::string>& newargs)
+ std::vector<std::string>& newargs,
+ bool emptyArgs)
{
// If argument is empty, it is an empty list.
- if(arg.length() == 0)
+ if(arg.length() == 0 && !emptyArgs)
{
return;
}
@@ -1027,7 +1028,7 @@ void cmSystemTools::ExpandListArgument(const std::string& arg,
// brackets.
if(squareNesting == 0)
{
- if ( newArgVec.size() )
+ if ( newArgVec.size() || emptyArgs )
{
// Add the last argument if the string is not empty.
newArgVec.push_back(0);
@@ -1047,7 +1048,7 @@ void cmSystemTools::ExpandListArgument(const std::string& arg,
} break;
}
}
- if ( newArgVec.size() )
+ if ( newArgVec.size() || emptyArgs )
{
// Add the last argument if the string is not empty.
newArgVec.push_back(0);