diff options
author | Brad King <brad.king@kitware.com> | 2008-01-02 23:30:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-02 23:30:48 (GMT) |
commit | aa399c235030c2acbc725b4d4533595b07640640 (patch) | |
tree | cf36b612a52dd71a3650a188c9daf2b62a16d69d /Source/cmDependsFortran.cxx | |
parent | 3fbd0ad869d51b15fe8c8f052a2c67761669e068 (diff) | |
download | CMake-aa399c235030c2acbc725b4d4533595b07640640.zip CMake-aa399c235030c2acbc725b4d4533595b07640640.tar.gz CMake-aa399c235030c2acbc725b4d4533595b07640640.tar.bz2 |
ENH: Cleanup Fortran build directories by placing module stamp files in the target directory that builds them. This is actually a simpler implementation anyway.
Diffstat (limited to 'Source/cmDependsFortran.cxx')
-rw-r--r-- | Source/cmDependsFortran.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 510f75a..489da9c 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -195,8 +195,7 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, this->LocateModules(); // Get the directory in which stamp files will be stored. - const char* stamp_dir = - this->LocalGenerator->GetMakefile()->GetCurrentOutputDirectory(); + const char* stamp_dir = this->TargetDirectory.c_str(); // Get the directory in which module files will be created. const char* mod_dir; @@ -208,7 +207,8 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, } else { - mod_dir = stamp_dir; + mod_dir = + this->LocalGenerator->GetMakefile()->GetCurrentOutputDirectory(); } // Actually write dependencies to the streams. @@ -330,10 +330,7 @@ void cmDependsFortran::LocateModules() std::ifstream fin(fname.c_str()); if(fin) { - std::string moduleDir = - cmSystemTools::GetFilenamePath( - cmSystemTools::GetFilenamePath(targetDir)); - this->MatchRemoteModules(fin, moduleDir.c_str()); + this->MatchRemoteModules(fin, targetDir.c_str()); } } } @@ -341,8 +338,7 @@ void cmDependsFortran::LocateModules() //---------------------------------------------------------------------------- void cmDependsFortran::MatchLocalModules() { - const char* stampDir = - this->LocalGenerator->GetMakefile()->GetCurrentOutputDirectory(); + const char* stampDir = this->TargetDirectory.c_str(); std::set<cmStdString> const& provides = this->Internal->TargetProvides; for(std::set<cmStdString>::const_iterator i = provides.begin(); i != provides.end(); ++i) |