summaryrefslogtreecommitdiff
path: root/Source/CPack/IFW/cmCPackIFWPackage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack/IFW/cmCPackIFWPackage.cxx')
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index a1a52b185..9a9cd5678 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -2,21 +2,22 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackIFWPackage.h"
+#include <cstddef>
+#include <map>
+#include <sstream>
+#include <utility>
+
#include "cmCPackComponentGroup.h"
#include "cmCPackIFWCommon.h"
#include "cmCPackIFWGenerator.h"
#include "cmCPackIFWInstaller.h"
#include "cmCPackLog.h" // IWYU pragma: keep
#include "cmGeneratedFileStream.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmTimestamp.h"
#include "cmXMLWriter.h"
-#include <map>
-#include <sstream>
-#include <stddef.h>
-#include <utility>
-
//---------------------------------------------------------- CompareStruct ---
cmCPackIFWPackage::CompareStruct::CompareStruct()
: Type(cmCPackIFWPackage::CompareNone)
@@ -196,7 +197,7 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component)
// User interfaces
if (const char* option = this->GetOption(prefix + "USER_INTERFACES")) {
this->UserInterfaces.clear();
- cmSystemTools::ExpandListArgument(option, this->UserInterfaces);
+ cmExpandList(option, this->UserInterfaces);
}
// CMake dependencies
@@ -209,7 +210,7 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component)
// Licenses
if (const char* option = this->GetOption(prefix + "LICENSES")) {
this->Licenses.clear();
- cmSystemTools::ExpandListArgument(option, this->Licenses);
+ cmExpandList(option, this->Licenses);
if (this->Licenses.size() % 2 != 0) {
cmCPackIFWLogger(
WARNING,
@@ -281,13 +282,13 @@ int cmCPackIFWPackage::ConfigureFromGroup(cmCPackComponentGroup* group)
// User interfaces
if (const char* option = this->GetOption(prefix + "USER_INTERFACES")) {
this->UserInterfaces.clear();
- cmSystemTools::ExpandListArgument(option, this->UserInterfaces);
+ cmExpandList(option, this->UserInterfaces);
}
// Licenses
if (const char* option = this->GetOption(prefix + "LICENSES")) {
this->Licenses.clear();
- cmSystemTools::ExpandListArgument(option, this->Licenses);
+ cmExpandList(option, this->Licenses);
if (this->Licenses.size() % 2 != 0) {
cmCPackIFWLogger(
WARNING,
@@ -398,18 +399,18 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
this->Translations.clear();
} else if (const char* value = this->GetOption(option)) {
this->Translations.clear();
- cmSystemTools::ExpandListArgument(value, this->Translations);
+ cmExpandList(value, this->Translations);
}
// QtIFW dependencies
std::vector<std::string> deps;
option = prefix + "DEPENDS";
if (const char* value = this->GetOption(option)) {
- cmSystemTools::ExpandListArgument(value, deps);
+ cmExpandList(value, deps);
}
option = prefix + "DEPENDENCIES";
if (const char* value = this->GetOption(option)) {
- cmSystemTools::ExpandListArgument(value, deps);
+ cmExpandList(value, deps);
}
for (std::string const& d : deps) {
DependenceStruct dep(d);
@@ -430,8 +431,7 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
if (this->IsSetToEmpty(option)) {
this->AlienAutoDependOn.clear();
} else if (const char* value = this->GetOption(option)) {
- std::vector<std::string> depsOn;
- cmSystemTools::ExpandListArgument(value, depsOn);
+ std::vector<std::string> depsOn = cmExpandedList(value);
for (std::string const& d : depsOn) {
DependenceStruct dep(d);
if (this->Generator->Packages.count(dep.Name)) {
@@ -488,7 +488,7 @@ int cmCPackIFWPackage::ConfigureFromPrefix(const std::string& prefix)
this->Replaces.clear();
} else if (const char* value = this->GetOption(option)) {
this->Replaces.clear();
- cmSystemTools::ExpandListArgument(value, this->Replaces);
+ cmExpandList(value, this->Replaces);
}
// Requires admin rights
@@ -620,7 +620,7 @@ void cmCPackIFWPackage::GeneratePackageFile()
// Write dependencies
if (!compDepSet.empty()) {
std::ostringstream dependencies;
- std::set<DependenceStruct>::iterator it = compDepSet.begin();
+ auto it = compDepSet.begin();
dependencies << it->NameWithCompare();
++it;
while (it != compDepSet.end()) {
@@ -638,7 +638,7 @@ void cmCPackIFWPackage::GeneratePackageFile()
// Write automatic dependency on
if (!compAutoDepSet.empty()) {
std::ostringstream dependencies;
- std::set<DependenceStruct>::iterator it = compAutoDepSet.begin();
+ auto it = compAutoDepSet.begin();
dependencies << it->NameWithCompare();
++it;
while (it != compAutoDepSet.end()) {
@@ -674,7 +674,7 @@ void cmCPackIFWPackage::GeneratePackageFile()
// Replaces
if (!this->Replaces.empty()) {
std::ostringstream replaces;
- std::vector<std::string>::iterator it = this->Replaces.begin();
+ auto it = this->Replaces.begin();
replaces << *it;
++it;
while (it != this->Replaces.end()) {