From 0eed548d3f0387a3bcbdc42ad4456987a37b2934 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Thu, 30 May 2019 12:19:00 +0200 Subject: Ninja: Use cmNinjaBuild instead of WritePhonyBuild --- Source/cmNinjaTargetGenerator.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 140730b..e878adb 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -829,7 +829,11 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements() } { - cmNinjaDeps orderOnlyDeps; + cmNinjaBuild build("phony"); + build.Comment = "Order-only phony target for " + this->GetTargetName(); + build.Outputs.push_back(this->OrderDependsTargetForTarget()); + + cmNinjaDeps& orderOnlyDeps = build.OrderOnlyDeps; this->GetLocalGenerator()->AppendTargetDepends( this->GeneratorTarget, orderOnlyDeps, DependOnTargetOrdering); @@ -867,14 +871,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements() orderOnlyDeps.push_back(this->ConvertToNinjaPath(tgtDir)); } - { - cmNinjaDeps orderOnlyTarget; - orderOnlyTarget.push_back(this->OrderDependsTargetForTarget()); - this->GetGlobalGenerator()->WritePhonyBuild( - this->GetBuildFileStream(), - "Order-only phony target for " + this->GetTargetName(), - orderOnlyTarget, cmNinjaDeps(), cmNinjaDeps(), orderOnlyDeps); - } + this->GetGlobalGenerator()->WriteBuild(this->GetBuildFileStream(), build); } { -- cgit v0.12