mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 04:40:18 -05:00
ENH: Add per-language clean rule generation to cmake_clean.cmake files to include cmake_clean_<lang>.cmake files generated by dependency scanning. Add Fortran module file and timestamp cleaning rules.
This commit is contained in:
@@ -1048,6 +1048,26 @@ cmLocalUnixMakefileGenerator3
|
||||
}
|
||||
fout << ")\n";
|
||||
commands.push_back(remove);
|
||||
|
||||
// For the main clean rule add per-language cleaning.
|
||||
if(!filename)
|
||||
{
|
||||
// Get the set of source languages in the target.
|
||||
std::set<cmStdString> languages;
|
||||
target.GetLanguages(languages);
|
||||
fout << "\n"
|
||||
<< "# Per-language clean rules from dependency scanning.\n"
|
||||
<< "FOREACH(lang";
|
||||
for(std::set<cmStdString>::const_iterator l = languages.begin();
|
||||
l != languages.end(); ++l)
|
||||
{
|
||||
fout << " " << *l;
|
||||
}
|
||||
fout << ")\n"
|
||||
<< " INCLUDE(" << this->GetTargetDirectory(target)
|
||||
<< "/cmake_clean_${lang}.cmake OPTIONAL)\n"
|
||||
<< "ENDFOREACH(lang)\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user