ENH: Cleanup Fortran build directories by placing module stamp files in the target directory that builds them. This is actually a simpler implementation anyway.

This commit is contained in:
Brad King 2008-01-02 18:30:48 -05:00
parent 3fbd0ad869
commit aa399c2350
1 changed files with 5 additions and 9 deletions

View File

@ -195,8 +195,7 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
this->LocateModules(); this->LocateModules();
// Get the directory in which stamp files will be stored. // Get the directory in which stamp files will be stored.
const char* stamp_dir = const char* stamp_dir = this->TargetDirectory.c_str();
this->LocalGenerator->GetMakefile()->GetCurrentOutputDirectory();
// Get the directory in which module files will be created. // Get the directory in which module files will be created.
const char* mod_dir; const char* mod_dir;
@ -208,7 +207,8 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
} }
else else
{ {
mod_dir = stamp_dir; mod_dir =
this->LocalGenerator->GetMakefile()->GetCurrentOutputDirectory();
} }
// Actually write dependencies to the streams. // Actually write dependencies to the streams.
@ -330,10 +330,7 @@ void cmDependsFortran::LocateModules()
std::ifstream fin(fname.c_str()); std::ifstream fin(fname.c_str());
if(fin) if(fin)
{ {
std::string moduleDir = this->MatchRemoteModules(fin, targetDir.c_str());
cmSystemTools::GetFilenamePath(
cmSystemTools::GetFilenamePath(targetDir));
this->MatchRemoteModules(fin, moduleDir.c_str());
} }
} }
} }
@ -341,8 +338,7 @@ void cmDependsFortran::LocateModules()
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmDependsFortran::MatchLocalModules() void cmDependsFortran::MatchLocalModules()
{ {
const char* stampDir = const char* stampDir = this->TargetDirectory.c_str();
this->LocalGenerator->GetMakefile()->GetCurrentOutputDirectory();
std::set<cmStdString> const& provides = this->Internal->TargetProvides; std::set<cmStdString> const& provides = this->Internal->TargetProvides;
for(std::set<cmStdString>::const_iterator i = provides.begin(); for(std::set<cmStdString>::const_iterator i = provides.begin();
i != provides.end(); ++i) i != provides.end(); ++i)