summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-07-31 07:06:04 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-08-05 09:25:30 (GMT)
commit7fbcc16dcd92a80eb30baab93388a0b8e294969b (patch)
tree33958836b22312caaa67cd3eb331c5676e2cf8a7 /Source/CPack
parent3ebd3fa51d229e0067e8ca24f8fa4ed35ee5dac8 (diff)
downloadCMake-7fbcc16dcd92a80eb30baab93388a0b8e294969b.zip
CMake-7fbcc16dcd92a80eb30baab93388a0b8e294969b.tar.gz
CMake-7fbcc16dcd92a80eb30baab93388a0b8e294969b.tar.bz2
cmStringAlgorithms: cmIsSpace, cmTrimWhitespace, cmEscapeQuotes, cmTokenize
This adds the following functions to `cmStringAlgorithms`: - `cmIsSpace` - `cmTrimWhitespace` (moved from `cmSystemTools::TrimWhitespace`) - `cmEscapeQuotes` (moved from `cmSystemTools::EscapeQuotes`) - `cmTokenize` (moved from `cmSystemTools::tokenize` and adapted to accept `cm::string_view`)
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx3
-rw-r--r--Source/CPack/WiX/cmCMakeToWixPath.cxx4
-rw-r--r--Source/CPack/WiX/cmWIXAccessControlList.cxx7
3 files changed, 7 insertions, 7 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index a075a17..f130e05 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -8,6 +8,7 @@
#include "cmCPackIFWRepository.h"
#include "cmCPackLog.h" // IWYU pragma: keep
#include "cmGeneratedFileStream.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmXMLParser.h"
#include "cmXMLWriter.h"
@@ -292,7 +293,7 @@ protected:
{
if (this->file) {
std::string content(data, data + length);
- content = cmSystemTools::TrimWhitespace(content);
+ content = cmTrimWhitespace(content);
std::string source = this->basePath + "/" + content;
std::string destination = this->path + "/" + content;
if (!cmSystemTools::CopyFileIfDifferent(source, destination)) {
diff --git a/Source/CPack/WiX/cmCMakeToWixPath.cxx b/Source/CPack/WiX/cmCMakeToWixPath.cxx
index b3889cf..630a8f8 100644
--- a/Source/CPack/WiX/cmCMakeToWixPath.cxx
+++ b/Source/CPack/WiX/cmCMakeToWixPath.cxx
@@ -2,7 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCMakeToWixPath.h"
-#include "cmSystemTools.h"
+#include "cmStringAlgorithms.h"
#include <string>
#include <vector>
@@ -29,7 +29,7 @@ std::string CMakeToWixPath(const std::string& cygpath)
return cygpath;
}
- return cmSystemTools::TrimWhitespace(winpath_chars.data());
+ return cmTrimWhitespace(winpath_chars.data());
}
#else
std::string CMakeToWixPath(const std::string& path)
diff --git a/Source/CPack/WiX/cmWIXAccessControlList.cxx b/Source/CPack/WiX/cmWIXAccessControlList.cxx
index 563de02..b5e287d 100644
--- a/Source/CPack/WiX/cmWIXAccessControlList.cxx
+++ b/Source/CPack/WiX/cmWIXAccessControlList.cxx
@@ -4,6 +4,7 @@
#include "cmCPackGenerator.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
cmWIXAccessControlList::cmWIXAccessControlList(
@@ -48,8 +49,7 @@ void cmWIXAccessControlList::CreatePermissionElement(std::string const& entry)
user = user_and_domain;
}
- std::vector<std::string> permissions =
- cmSystemTools::tokenize(permission_string, ",");
+ std::vector<std::string> permissions = cmTokenize(permission_string, ",");
this->SourceWriter.BeginElement("Permission");
this->SourceWriter.AddAttribute("User", user);
@@ -57,8 +57,7 @@ void cmWIXAccessControlList::CreatePermissionElement(std::string const& entry)
this->SourceWriter.AddAttribute("Domain", domain);
}
for (std::string const& permission : permissions) {
- this->EmitBooleanAttribute(entry,
- cmSystemTools::TrimWhitespace(permission));
+ this->EmitBooleanAttribute(entry, cmTrimWhitespace(permission));
}
this->SourceWriter.EndElement("Permission");
}