From 182d9597ec7b28727dc8e878a90a9bedf6d33f51 Mon Sep 17 00:00:00 2001 From: Pedro Navarro Date: Thu, 30 Aug 2018 15:31:32 -0700 Subject: Makefile: Add custom command byproducts to clean rules --- Source/cmMakefileTargetGenerator.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index c8dc392..65a69d1 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -181,6 +181,12 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, output)); } + const std::vector& byproducts = ccg.GetByproducts(); + for (std::string const& byproduct : byproducts) { + this->CleanFiles.push_back( + this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, + byproduct)); + } } } std::vector headerSources; -- cgit v0.12