diff options
author | Brad King <brad.king@kitware.com> | 2007-12-28 11:50:14 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-12-28 11:50:14 -0500 |
commit | 81f6e86f12721da4eb9d0d0b4de290a7ef8f55e2 (patch) | |
tree | 2f2973b858c53e95d7be9b554fd626fcffa8b207 /Source/cmDependsFortran.cxx | |
parent | 68dad94b00822dd69a81fb4f00997b190c73663f (diff) | |
download | cmake-81f6e86f12721da4eb9d0d0b4de290a7ef8f55e2.tar.gz |
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/cmDependsFortran.cxx')
-rw-r--r-- | Source/cmDependsFortran.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index c47e09dd0d..ec4ae2a2a7 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -219,6 +219,27 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, { fiStream << " " << *i << "\n"; } + + // Create a script to clean the modules. + if(!provides.empty()) + { + std::string fcName = this->TargetDirectory; + fcName += "/cmake_clean_Fortran.cmake"; + cmGeneratedFileStream fcStream(fcName.c_str()); + fcStream << "# Remove fortran modules provided by this target.\n"; + fcStream << "FILE(REMOVE\n"; + for(std::set<cmStdString>::const_iterator i = provides.begin(); + i != provides.end(); ++i) + { + std::string mod_upper = cmSystemTools::UpperCase(*i); + std::string mod_lower = *i; + fcStream << " \"" << mod_lower << ".mod\"" + << " \"" << mod_lower << ".mod.stamp\"" + << " \"" << mod_upper << ".mod\"" + << " \"" << mod_upper << ".mod.stamp\"\n"; + } + fcStream << " )\n"; + } return true; } |