From 8a46a07c8bd2fddde5e4db797279e21a5575e213 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Thu, 30 May 2019 11:20:20 +0200 Subject: Ninja: Make WriteMacOSXContentBuild use cmNinjaBuild internally --- Source/cmGlobalNinjaGenerator.cxx | 20 ++++++++------------ Source/cmGlobalNinjaGenerator.h | 4 ++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index c362dc6..94c7659 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -307,20 +307,16 @@ void cmGlobalNinjaGenerator::AddMacOSXContentRule() this->AddRule(rule); } -void cmGlobalNinjaGenerator::WriteMacOSXContentBuild(const std::string& input, - const std::string& output) +void cmGlobalNinjaGenerator::WriteMacOSXContentBuild(std::string input, + std::string output) { this->AddMacOSXContentRule(); - - cmNinjaDeps outputs; - outputs.push_back(output); - cmNinjaDeps deps; - deps.push_back(input); - cmNinjaVars vars; - - this->WriteBuild(*this->BuildFileStream, "", "COPY_OSX_CONTENT", outputs, - /*implicitOuts=*/cmNinjaDeps(), deps, cmNinjaDeps(), - cmNinjaDeps(), cmNinjaVars()); + { + cmNinjaBuild build("COPY_OSX_CONTENT"); + build.Outputs.push_back(std::move(output)); + build.ExplicitDeps.push_back(std::move(input)); + this->WriteBuild(*this->BuildFileStream, build); + } } void cmGlobalNinjaGenerator::WriteRule(std::ostream& os, diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 037c20e..7b62e38 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -141,8 +141,8 @@ public: bool restat, const cmNinjaDeps& outputs, const cmNinjaDeps& deps = cmNinjaDeps(), const cmNinjaDeps& orderOnly = cmNinjaDeps()); - void WriteMacOSXContentBuild(const std::string& input, - const std::string& output); + + void WriteMacOSXContentBuild(std::string input, std::string output); /** * Write a rule statement to @a os. -- cgit v0.12