[cmake-commits] king committed cmDependsFortran.cxx 1.39 1.40

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jan 2 18:30:50 EST 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv7396/Source

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


Index: cmDependsFortran.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDependsFortran.cxx,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- cmDependsFortran.cxx	2 Jan 2008 16:04:52 -0000	1.39
+++ cmDependsFortran.cxx	2 Jan 2008 23:30:48 -0000	1.40
@@ -195,8 +195,7 @@
   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 @@
     }
   else
     {
-    mod_dir = stamp_dir;
+    mod_dir =
+      this->LocalGenerator->GetMakefile()->GetCurrentOutputDirectory();
     }
 
   // Actually write dependencies to the streams.
@@ -330,10 +330,7 @@
     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::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)



More information about the Cmake-commits mailing list