summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-08-11 10:06:19 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-08-14 14:33:20 (GMT)
commit2f6495e24e57cd4a03f38e615cc60177e89afb96 (patch)
tree4aa5afc3f95e56bd4777a452fff094a6a965b7c6 /Source/cmSystemTools.cxx
parentf4f3c68926492e5660c4e66d5cdcf2298619c1b9 (diff)
downloadCMake-2f6495e24e57cd4a03f38e615cc60177e89afb96.zip
CMake-2f6495e24e57cd4a03f38e615cc60177e89afb96.tar.gz
CMake-2f6495e24e57cd4a03f38e615cc60177e89afb96.tar.bz2
cmSystemTools: Remove ExpandListArgument methods
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx73
1 files changed, 0 insertions, 73 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index ee60f16..7d9b3b9 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1089,79 +1089,6 @@ void cmSystemTools::GlobDirs(const std::string& path,
}
}
-void cmSystemTools::ExpandListArgument(cm::string_view arg,
- std::vector<std::string>& argsOut,
- bool emptyArgs)
-{
- // If argument is empty, it is an empty list.
- if (!emptyArgs && arg.empty()) {
- return;
- }
-
- // if there are no ; in the name then just copy the current string
- if (arg.find(';') == cm::string_view::npos) {
- argsOut.emplace_back(arg);
- return;
- }
-
- std::string newArg;
- // Break the string at non-escaped semicolons not nested in [].
- int squareNesting = 0;
- cm::string_view::iterator last = arg.begin();
- cm::string_view::iterator const cend = arg.end();
- for (cm::string_view::iterator c = last; c != cend; ++c) {
- switch (*c) {
- case '\\': {
- // We only want to allow escaping of semicolons. Other
- // escapes should not be processed here.
- cm::string_view::iterator cnext = c + 1;
- if ((cnext != cend) && *cnext == ';') {
- newArg.append(last, c);
- // Skip over the escape character
- last = cnext;
- c = cnext;
- }
- } break;
- case '[': {
- ++squareNesting;
- } break;
- case ']': {
- --squareNesting;
- } break;
- case ';': {
- // Break the string here if we are not nested inside square
- // brackets.
- if (squareNesting == 0) {
- newArg.append(last, c);
- // Skip over the semicolon
- last = c + 1;
- if (!newArg.empty() || emptyArgs) {
- // Add the last argument if the string is not empty.
- argsOut.push_back(newArg);
- newArg.clear();
- }
- }
- } break;
- default: {
- // Just append this character.
- } break;
- }
- }
- newArg.append(last, cend);
- if (!newArg.empty() || emptyArgs) {
- // Add the last argument if the string is not empty.
- argsOut.push_back(std::move(newArg));
- }
-}
-
-std::vector<std::string> cmSystemTools::ExpandedListArgument(
- cm::string_view arg, bool emptyArgs)
-{
- std::vector<std::string> argsOut;
- ExpandListArgument(arg, argsOut, emptyArgs);
- return argsOut;
-}
-
bool cmSystemTools::SimpleGlob(const std::string& glob,
std::vector<std::string>& files,
int type /* = 0 */)