[cmake-commits] king committed cmDependsFortran.cxx 1.29 1.30 cmDependsFortran.h 1.7 1.8 cmLocalUnixMakefileGenerator3.cxx 1.220 1.221

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Dec 19 14:28:48 EST 2007


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

Modified Files:
	cmDependsFortran.cxx cmDependsFortran.h 
	cmLocalUnixMakefileGenerator3.cxx 
Log Message:
ENH: Pass target directory to cmDependsFortran scanning instances.


Index: cmDependsFortran.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDependsFortran.cxx,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- cmDependsFortran.cxx	15 Dec 2007 20:35:00 -0000	1.29
+++ cmDependsFortran.cxx	19 Dec 2007 19:28:46 -0000	1.30
@@ -90,8 +90,9 @@
 }
 
 //----------------------------------------------------------------------------
-cmDependsFortran::cmDependsFortran(std::vector<std::string> const& includes):
-  IncludePath(&includes)
+cmDependsFortran::cmDependsFortran(std::vector<std::string> const& includes,
+                                   std::string const& targetDirectory):
+  IncludePath(&includes), TargetDirectory(targetDirectory)
 {
 }
 
@@ -267,8 +268,12 @@
 
     // Make sure the module timestamp rule is evaluated by the time
     // the target finishes building.
-    makeDepends << cmSystemTools::GetFilenamePath(obj) << "/build: "
-                << obj << ".provides.build\n";
+    std::string driver = this->TargetDirectory;
+    driver += "/build";
+    driver = this->LocalGenerator->Convert(driver.c_str(),
+                                           cmLocalGenerator::HOME_OUTPUT,
+                                           cmLocalGenerator::MAKEFILE);
+    makeDepends << driver << ": " << obj << ".provides.build\n";
     }
 
   /*

Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.220
retrieving revision 1.221
diff -u -d -r1.220 -r1.221
--- cmLocalUnixMakefileGenerator3.cxx	18 Dec 2007 14:50:08 -0000	1.220
+++ cmLocalUnixMakefileGenerator3.cxx	19 Dec 2007 19:28:46 -0000	1.221
@@ -1367,7 +1367,7 @@
 #ifdef CMAKE_BUILD_WITH_CMAKE
     else if(lang == "Fortran")
       {
-      scanner = new cmDependsFortran(includes);
+      scanner = new cmDependsFortran(includes, dir);
       }
     else if(lang == "Java")
       {

Index: cmDependsFortran.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDependsFortran.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cmDependsFortran.h	15 Mar 2006 16:02:00 -0000	1.7
+++ cmDependsFortran.h	19 Dec 2007 19:28:46 -0000	1.8
@@ -31,9 +31,10 @@
 
   /** Scanning need to know the build directory name, the relative
       path from the build directory to the target file, the source
-      file from which to start scanning, and the include file search
-      path.  */
-  cmDependsFortran(std::vector<std::string> const& includes);
+      file from which to start scanning, the include file search
+      path, and the target directory.  */
+  cmDependsFortran(std::vector<std::string> const& includes,
+                   std::string const& targetDirectory);
 
   /** Virtual destructor to cleanup subclasses properly.  */
   virtual ~cmDependsFortran();
@@ -61,6 +62,9 @@
   // The include file search path.
   std::vector<std::string> const* IncludePath;
 
+  // The full path to the target's build directory.
+  std::string TargetDirectory;
+
 private:
   cmDependsFortran(cmDependsFortran const&); // Purposely not implemented.
   void operator=(cmDependsFortran const&); // Purposely not implemented.



More information about the Cmake-commits mailing list