summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-12-28 16:50:14 (GMT)
committerBrad King <brad.king@kitware.com>2007-12-28 16:50:14 (GMT)
commit81f6e86f12721da4eb9d0d0b4de290a7ef8f55e2 (patch)
tree2f2973b858c53e95d7be9b554fd626fcffa8b207 /Source/cmLocalUnixMakefileGenerator3.cxx
parent68dad94b00822dd69a81fb4f00997b190c73663f (diff)
downloadCMake-81f6e86f12721da4eb9d0d0b4de290a7ef8f55e2.zip
CMake-81f6e86f12721da4eb9d0d0b4de290a7ef8f55e2.tar.gz
CMake-81f6e86f12721da4eb9d0d0b4de290a7ef8f55e2.tar.bz2
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.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 3ceeccc..8838b42 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -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";
+ }
}
}