summaryrefslogtreecommitdiffstats
path: root/Source/cmParseArgumentsCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmParseArgumentsCommand.cxx')
-rw-r--r--Source/cmParseArgumentsCommand.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx
index b0462f0..f193ed9 100644
--- a/Source/cmParseArgumentsCommand.cxx
+++ b/Source/cmParseArgumentsCommand.cxx
@@ -20,7 +20,9 @@
#include "cmSystemTools.h"
#include "cmValue.h"
-static std::string EscapeArg(const std::string& arg)
+namespace {
+
+std::string EscapeArg(const std::string& arg)
{
// replace ";" with "\;" so output argument lists will split correctly
std::string escapedArg;
@@ -33,14 +35,12 @@ static std::string EscapeArg(const std::string& arg)
return escapedArg;
}
-static std::string JoinList(std::vector<std::string> const& arg, bool escape)
+std::string JoinList(std::vector<std::string> const& arg, bool escape)
{
- return escape ? cmJoin(cmMakeRange(arg).transform(EscapeArg), ";")
- : cmJoin(cmMakeRange(arg), ";");
+ return escape ? cmList::to_string(cmMakeRange(arg).transform(EscapeArg))
+ : cmList::to_string(cmMakeRange(arg));
}
-namespace {
-
using options_map = std::map<std::string, bool>;
using single_map = std::map<std::string, std::string>;
using multi_map =
@@ -108,8 +108,9 @@ static void PassParsedArguments(
}
if (!keywordsMissingValues.empty()) {
- makefile.AddDefinition(prefix + "KEYWORDS_MISSING_VALUES",
- cmJoin(cmMakeRange(keywordsMissingValues), ";"));
+ makefile.AddDefinition(
+ prefix + "KEYWORDS_MISSING_VALUES",
+ cmList::to_string(cmMakeRange(keywordsMissingValues)));
} else {
makefile.RemoveDefinition(prefix + "KEYWORDS_MISSING_VALUES");
}