summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 81cafa3..e28b876 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -5,7 +5,7 @@
#include <algorithm>
#include <assert.h>
#include <iterator>
-#include <memory> // IWYU pragma: keep
+#include <memory>
#include <sstream>
#include <stdio.h>
#include <utility>
@@ -25,6 +25,7 @@
#include "cmSourceFile.h"
#include "cmState.h"
#include "cmStateTypes.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmake.h"
#include "cmsys/FStream.hxx"
@@ -102,8 +103,7 @@ void cmLocalNinjaGenerator::Generate()
std::string cmLocalNinjaGenerator::GetTargetDirectory(
cmGeneratorTarget const* target) const
{
- std::string dir = "CMakeFiles/";
- dir += target->GetName();
+ std::string dir = cmStrCat("CMakeFiles/", target->GetName());
#if defined(__VMS)
dir += "_dir";
#else
@@ -221,8 +221,7 @@ void cmLocalNinjaGenerator::WritePools(std::ostream& os)
if (jobpools) {
cmGlobalNinjaGenerator::WriteComment(
os, "Pools defined by global property JOB_POOLS");
- std::vector<std::string> pools;
- cmSystemTools::ExpandListArgument(jobpools, pools);
+ std::vector<std::string> pools = cmExpandedList(jobpools);
for (std::string const& pool : pools) {
const std::string::size_type eq = pool.find('=');
unsigned int jobs;
@@ -300,8 +299,7 @@ std::string cmLocalNinjaGenerator::WriteCommandScript(
if (target) {
scriptPath = target->GetSupportDirectory();
} else {
- scriptPath = this->GetCurrentBinaryDirectory();
- scriptPath += "/CMakeFiles";
+ scriptPath = cmStrCat(this->GetCurrentBinaryDirectory(), "/CMakeFiles");
}
cmSystemTools::MakeDirectory(scriptPath);
scriptPath += '/';
@@ -555,7 +553,8 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatements()
++j;
for (; j != i->second.end(); ++j) {
- std::vector<std::string> jDeps, depsIntersection;
+ std::vector<std::string> jDeps;
+ std::vector<std::string> depsIntersection;
this->GetGlobalNinjaGenerator()->AppendTargetDependsClosure(*j, jDeps);
std::sort(jDeps.begin(), jDeps.end());
std::set_intersection(ccTargetDeps.begin(), ccTargetDeps.end(),
@@ -613,7 +612,7 @@ void cmLocalNinjaGenerator::AdditionalCleanFiles()
{
cmGeneratorExpression ge;
auto cge = ge.Parse(prop_value);
- cmSystemTools::ExpandListArgument(
+ cmExpandList(
cge->Evaluate(this,
this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE")),
cleanFiles);