Merge topic 'update-kwsys'

b41b30f16e Update use of KWSys SystemTools::SplitString for new signature
f2d97c1cdf Merge branch 'upstream-KWSys' into update-kwsys
6d7fdedde6 KWSys 2018-06-22 (49068d94)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2165
This commit is contained in:
Brad King
2018-06-25 13:56:48 +00:00
committed by Kitware Robot
9 changed files with 33 additions and 41 deletions

View File

@@ -7,7 +7,7 @@
#include "cmsys/FStream.hxx"
#include "cmsys/Glob.hxx"
#include "cmsys/RegularExpression.hxx"
#include "cmsys/String.hxx"
#include <algorithm>
#include <assert.h>
#include <memory> // IWYU pragma: keep
@@ -2484,11 +2484,11 @@ bool cmFileCommand::HandleCMakePathCommand(
#else
char pathSep = ':';
#endif
std::vector<cmsys::String> path = cmSystemTools::SplitString(*i, pathSep);
std::vector<std::string> path = cmSystemTools::SplitString(*i, pathSep);
i++;
const char* var = i->c_str();
std::string value;
for (std::vector<cmsys::String>::iterator j = path.begin(); j != path.end();
for (std::vector<std::string>::iterator j = path.begin(); j != path.end();
++j) {
if (j != path.begin()) {
value += ";";
@@ -2498,7 +2498,7 @@ bool cmFileCommand::HandleCMakePathCommand(
} else {
*j = cmSystemTools::ConvertToOutputPath(*j);
// remove double quotes in the path
cmsys::String& s = *j;
std::string& s = *j;
if (s.size() > 1 && s[0] == '\"' && s[s.size() - 1] == '\"') {
s = s.substr(1, s.size() - 2);