mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 20:46:37 +08:00
Makefiles: Add support for ADDITIONAL_CLEAN_FILES target property
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user