From 3ed8cffe73755f5267340d5b0abe8cb4e108e822 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Mon, 26 Aug 2019 11:47:27 +0200 Subject: Ninja: Add support for ADDITIONAL_CLEAN_FILES in custom targets This enables the support for `ADDITIONAL_CLEAN_FILES` in custom targets using the ninja generator. Fixes: #19641 --- Source/cmNinjaNormalTargetGenerator.cxx | 1 + Source/cmNinjaUtilityTargetGenerator.cxx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index f65abc8..b7b822a 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -85,6 +85,7 @@ void cmNinjaNormalTargetGenerator::Generate() this->WriteLinkStatement(); } + // Find ADDITIONAL_CLEAN_FILES this->AdditionalCleanFiles(); } diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx index 1225cbd..e774b53 100644 --- a/Source/cmNinjaUtilityTargetGenerator.cxx +++ b/Source/cmNinjaUtilityTargetGenerator.cxx @@ -135,6 +135,9 @@ void cmNinjaUtilityTargetGenerator::Generate() gg->WriteBuild(this->GetBuildFileStream(), phonyBuild); } + // Find ADDITIONAL_CLEAN_FILES + this->AdditionalCleanFiles(); + // Add an alias for the logical target name regardless of what directory // contains it. Skip this for GLOBAL_TARGET because they are meant to // be per-directory and have one at the top-level anyway. -- cgit v0.12