summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-05-13 17:55:33 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-05-14 15:50:14 (GMT)
commitd745df4b01f860c16fd65494a9735d1c73cfde04 (patch)
tree20b37e5e0b53db25e4ea9320c3b53751284efed1 /Source/cmMakefileTargetGenerator.cxx
parent124ec11720ba116fcec73c2397b43fb040d8b173 (diff)
downloadCMake-d745df4b01f860c16fd65494a9735d1c73cfde04.zip
CMake-d745df4b01f860c16fd65494a9735d1c73cfde04.tar.gz
CMake-d745df4b01f860c16fd65494a9735d1c73cfde04.tar.bz2
Makefiles: Add support for ADDITIONAL_CLEAN_FILES target property
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 3f97ad0..a751b24 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -184,6 +184,18 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
}
}
+ // Look for additional files registered for cleaning in this target.
+ if (const char* prop_value =
+ this->GeneratorTarget->GetProperty("ADDITIONAL_CLEAN_FILES")) {
+ std::vector<std::string> const files = evaluatedFiles(prop_value);
+ // For relative path support
+ std::string const& binaryDir =
+ this->LocalGenerator->GetCurrentBinaryDirectory();
+ for (std::string const& cfl : files) {
+ this->CleanFiles.insert(cmSystemTools::CollapseFullPath(cfl, binaryDir));
+ }
+ }
+
// add custom commands to the clean rules?
const char* clean_no_custom = this->Makefile->GetProperty("CLEAN_NO_CUSTOM");
bool clean = cmSystemTools::IsOff(clean_no_custom);