summaryrefslogtreecommitdiff
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-18 23:50:36 +0100
committerStephen Kelly <steveire@gmail.com>2015-02-20 21:35:58 +0100
commit37b88d348a20921c835ce7aa99f6db62271503a7 (patch)
tree96259ea4c15995957740dfbf421ebed066cb221f /Source/cmSystemTools.cxx
parenta281809384cc19cc9a7d1726b243020b380b9395 (diff)
downloadcmake-37b88d348a20921c835ce7aa99f6db62271503a7.tar.gz
cmAlgorithms: Add cmWrap.
Port some existing cmJoin to use it. cmJoin is cumbersome to use in cases where the objective is to somehow 'quote' each item and then join it with a separator. In that case, the joiner string is harder to read and reason about. cmWrap aims to solve that. Provide an overload taking char wrappers to simplify the case of surrounding every element in quotes without needing to escape the quote character.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index bf496e9483..5264123d77 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -835,7 +835,7 @@ cmSystemTools::PrintSingleCommand(std::vector<std::string> const& command)
return std::string();
}
- return "\"" + cmJoin(command, "\" \"") + "\"";
+ return cmWrap('"', command, '"', " ");
}
bool cmSystemTools::DoesFileExistWithExtensions(