Makefiles: Process ADDTIONAL_CLEAN_FILES dir prop at directory level

In the "Unix Makefiles" generator, the `ADDTIONAL_CLEAN_FILES` directory
property was evaluated on a per target basis. This had two drawbacks:
- per directory clean files were repeated in every target clean script
- per directory clean files weren't removed in directories without targets
  (issue #8164)

This patch moves the `ADDTIONAL_CLEAN_FILES` directory property processing
from the target to the directory level clean target.

Fixes: #8164 "ADDITIONAL_CLEAN_FILES directory property not respected if no
              target present in directory"
This commit is contained in:
Sebastian Holtermann
2019-05-17 17:15:50 +02:00
parent 827da1119e
commit 1ded3599d6
5 changed files with 63 additions and 18 deletions

View File

@@ -227,6 +227,7 @@ protected:
const std::set<std::string>& files,
cmGeneratorTarget* target,
const char* filename = nullptr);
void AppendDirectoryCleanCommand(std::vector<std::string>& commands);
// Helper methods for dependency updates.
bool ScanDependencies(std::string const& targetDir,