summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 3a69b2e..490a905 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -43,6 +43,7 @@
#include "cmGlobalGenerator.h"
#include "cmInstallGenerator.h" // IWYU pragma: keep
#include "cmInstallSubdirectoryGenerator.h"
+#include "cmList.h"
#include "cmListFileCache.h"
#include "cmLocalGenerator.h"
#include "cmMessageType.h"
@@ -1448,15 +1449,13 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove)
if (remove) {
if (cmValue cdefs = this->GetProperty("COMPILE_DEFINITIONS")) {
// Expand the list.
- std::vector<std::string> defs = cmExpandedList(*cdefs);
+ cmList defs{ *cdefs };
// Recompose the list without the definition.
- auto defEnd = std::remove(defs.begin(), defs.end(), define);
- auto defBegin = defs.begin();
- std::string ndefs = cmJoin(cmMakeRange(defBegin, defEnd), ";");
+ defs.remove_items({ define });
// Store the new list.
- this->SetProperty("COMPILE_DEFINITIONS", ndefs);
+ this->SetProperty("COMPILE_DEFINITIONS", defs.to_string());
}
} else {
// Append the definition to the directory property.
@@ -2064,7 +2063,7 @@ void cmMakefile::AddGlobalLinkInformation(cmTarget& target)
}
if (cmValue linkLibsProp = this->GetProperty("LINK_LIBRARIES")) {
- std::vector<std::string> linkLibs = cmExpandedList(*linkLibsProp);
+ cmList linkLibs{ *linkLibsProp };
for (auto j = linkLibs.begin(); j != linkLibs.end(); ++j) {
std::string libraryName = *j;
@@ -2378,7 +2377,7 @@ void cmMakefile::ExpandVariablesCMP0019()
}
if (cmValue linkLibsProp = this->GetProperty("LINK_LIBRARIES")) {
- std::vector<std::string> linkLibs = cmExpandedList(*linkLibsProp);
+ cmList linkLibs{ *linkLibsProp };
for (auto l = linkLibs.begin(); l != linkLibs.end(); ++l) {
std::string libName = *l;
@@ -3406,7 +3405,7 @@ bool cmMakefile::ExpandArguments(
if (i.Delim == cmListFileArgument::Quoted) {
outArgs.emplace_back(value, true);
} else {
- std::vector<std::string> stringArgs = cmExpandedList(value);
+ cmList stringArgs{ value };
for (std::string const& stringArg : stringArgs) {
outArgs.emplace_back(stringArg, false);
}
@@ -3812,7 +3811,7 @@ std::string cmMakefile::GetModulesFile(const std::string& filename,
// Always search in CMAKE_MODULE_PATH:
cmValue cmakeModulePath = this->GetDefinition("CMAKE_MODULE_PATH");
if (cmakeModulePath) {
- std::vector<std::string> modulePath = cmExpandedList(*cmakeModulePath);
+ cmList modulePath{ *cmakeModulePath };
// Look through the possible module directories.
for (std::string itempl : modulePath) {