summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-04-14 14:48:16 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-04-24 08:41:10 (GMT)
commite08ba229ee3107bcb814ca45bc9c72a48abf1ba2 (patch)
treec34d2ca05820acbb31202c5bdbc102059441076b /Source/cmNinjaTargetGenerator.cxx
parent51b0d45d9120d4bca5c7285d5e6b2f80db5a8310 (diff)
downloadCMake-e08ba229ee3107bcb814ca45bc9c72a48abf1ba2.zip
CMake-e08ba229ee3107bcb814ca45bc9c72a48abf1ba2.tar.gz
CMake-e08ba229ee3107bcb814ca45bc9c72a48abf1ba2.tar.bz2
CMake code rely on cmList class for CMake lists management (part. 1)
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 5dbc283..905c68e 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -32,6 +32,7 @@
#include "cmGeneratorTarget.h"
#include "cmGlobalCommonGenerator.h"
#include "cmGlobalNinjaGenerator.h"
+#include "cmList.h"
#include "cmLocalGenerator.h"
#include "cmLocalNinjaGenerator.h"
#include "cmMakefile.h"
@@ -1038,7 +1039,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
// If compiler launcher was specified and not consumed above, it
// goes to the beginning of the command line.
if (!compileCmds.empty() && !compilerLauncher.empty()) {
- std::vector<std::string> args = cmExpandedList(compilerLauncher, true);
+ cmList args{ compilerLauncher, cmList::EmptyElements::Yes };
if (!args.empty()) {
args[0] = this->LocalGenerator->ConvertToOutputFormat(
args[0], cmOutputConverter::SHELL);
@@ -1046,7 +1047,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
i = this->LocalGenerator->EscapeForShell(i);
}
}
- compileCmds.front().insert(0, cmStrCat(cmJoin(args, " "), ' '));
+ compileCmds.front().insert(0, cmStrCat(args.join(" "), ' '));
}
if (!compileCmds.empty()) {
@@ -1056,7 +1057,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
const auto& extraCommands = this->GetMakefile()->GetSafeDefinition(
cmStrCat("CMAKE_", lang, "_DEPENDS_EXTRA_COMMANDS"));
if (!extraCommands.empty()) {
- auto commandList = cmExpandedList(extraCommands);
+ cmList commandList{ extraCommands };
compileCmds.insert(compileCmds.end(), commandList.cbegin(),
commandList.cend());
}
@@ -1468,7 +1469,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
}
if (cmValue objectDeps = source->GetProperty("OBJECT_DEPENDS")) {
- std::vector<std::string> objDepList = cmExpandedList(*objectDeps);
+ cmList objDepList{ *objectDeps };
std::copy(objDepList.begin(), objDepList.end(),
std::back_inserter(depList));
}
@@ -1688,7 +1689,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
if (!evaluatedObjectOutputs.empty()) {
cmNinjaBuild build("phony");
build.Comment = "Additional output files.";
- build.Outputs = cmExpandedList(evaluatedObjectOutputs);
+ build.Outputs = cmList{ evaluatedObjectOutputs }.data();
std::transform(build.Outputs.begin(), build.Outputs.end(),
build.Outputs.begin(), this->MapToNinjaPath());
build.ExplicitDeps = objBuild.Outputs;