diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-13 17:52:10 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-14 15:50:14 (GMT) |
commit | 124ec11720ba116fcec73c2397b43fb040d8b173 (patch) | |
tree | 6f1c20200d5f02e4585bb546fa338c32a304057a /Source/cmMakefileTargetGenerator.cxx | |
parent | 43640fc80aaff645ba0d2897667cd2b4a85add03 (diff) | |
download | CMake-124ec11720ba116fcec73c2397b43fb040d8b173.zip CMake-124ec11720ba116fcec73c2397b43fb040d8b173.tar.gz CMake-124ec11720ba116fcec73c2397b43fb040d8b173.tar.bz2 |
Makefiles: Add support for ADDITIONAL_CLEAN_FILES directory property
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 2e945ce..3f97ad0 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -172,6 +172,18 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() this->CleanFiles.insert(files.begin(), files.end()); } + // Look for additional files registered for cleaning in this directory. + if (const char* prop_value = + this->Makefile->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); |