[cmake-commits] hoffman committed CMakeLists.txt 1.289.2.7 1.289.2.8 cmGlobalUnixMakefileGenerator3.h 1.27.2.5 1.27.2.6 cmLocalGenerator.cxx 1.132.2.9 1.132.2.10 cmMakefileExecutableTargetGenerator.cxx 1.12.2.7 1.12.2.8 cmMakefileLibraryTargetGenerator.cxx 1.14.2.5 1.14.2.6 cmMakefileTargetGenerator.cxx 1.16.2.8 1.16.2.9 cmMakefileTargetGenerator.h 1.6.2.3 1.6.2.4 cmMakefileUtilityTargetGenerator.cxx 1.2.2.1 1.2.2.2 cmTarget.cxx 1.96.2.7 1.96.2.8

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jan 3 10:19:05 EST 2007


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

Modified Files:
      Tag: CMake-2-4
	CMakeLists.txt cmGlobalUnixMakefileGenerator3.h 
	cmLocalGenerator.cxx cmMakefileExecutableTargetGenerator.cxx 
	cmMakefileLibraryTargetGenerator.cxx 
	cmMakefileTargetGenerator.cxx cmMakefileTargetGenerator.h 
	cmMakefileUtilityTargetGenerator.cxx cmTarget.cxx 
Log Message:
ENH: merge in fixes from main tree


Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.132.2.9
retrieving revision 1.132.2.10
diff -u -d -r1.132.2.9 -r1.132.2.10
--- cmLocalGenerator.cxx	28 Nov 2006 19:19:44 -0000	1.132.2.9
+++ cmLocalGenerator.cxx	3 Jan 2007 15:19:03 -0000	1.132.2.10
@@ -1865,6 +1865,8 @@
       tLocation = cmSystemTools::GetFilenamePath(tLocation);
       std::string depLocation = cmSystemTools::GetFilenamePath(
         std::string(inName));
+      depLocation = cmSystemTools::CollapseFullPath(depLocation.c_str());
+      tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
       if(depLocation != tLocation)
         {
         // it is a full path to a depend that has the same name

Index: cmMakefileUtilityTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileUtilityTargetGenerator.cxx,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -d -r1.2.2.1 -r1.2.2.2
--- cmMakefileUtilityTargetGenerator.cxx	30 Jun 2006 17:48:46 -0000	1.2.2.1
+++ cmMakefileUtilityTargetGenerator.cxx	3 Jan 2007 15:19:03 -0000	1.2.2.2
@@ -17,7 +17,7 @@
 #include "cmMakefileUtilityTargetGenerator.h"
 
 #include "cmGeneratedFileStream.h"
-#include "cmGlobalGenerator.h"
+#include "cmGlobalUnixMakefileGenerator3.h"
 #include "cmLocalUnixMakefileGenerator3.h"
 #include "cmMakefile.h"
 #include "cmSourceFile.h"
@@ -58,6 +58,17 @@
   objTarget += this->BuildFileName;
   this->LocalGenerator->AppendRuleDepend(depends, objTarget.c_str());
 
+  // If the rule is empty add the special empty rule dependency needed
+  // by some make tools.
+  if(depends.empty() && commands.empty())
+    {
+    std::string hack = this->GlobalGenerator->GetEmptyRuleHackDepends();
+    if(!hack.empty())
+      {
+      depends.push_back(hack);
+      }
+    }
+
   // Write the rule.
   this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
                                       this->Target->GetName(),

Index: cmGlobalUnixMakefileGenerator3.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.h,v
retrieving revision 1.27.2.5
retrieving revision 1.27.2.6
diff -u -d -r1.27.2.5 -r1.27.2.6
--- cmGlobalUnixMakefileGenerator3.h	13 Oct 2006 14:52:02 -0000	1.27.2.5
+++ cmGlobalUnixMakefileGenerator3.h	3 Jan 2007 15:19:03 -0000	1.27.2.6
@@ -115,6 +115,9 @@
       no rule.  This is used for multiple output dependencies.  */
   std::string GetEmptyCommandHack() { return this->EmptyCommandsHack; }
 
+  /** Get the fake dependency to use when a rule has no real commands
+      or dependencies.  */
+  std::string GetEmptyRuleHackDepends() { return this->EmptyRuleHackDepends; }
 
   // change the build command for speed
   virtual std::string GenerateBuildCommand

Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.14.2.5
retrieving revision 1.14.2.6
diff -u -d -r1.14.2.5 -r1.14.2.6
--- cmMakefileLibraryTargetGenerator.cxx	27 Oct 2006 20:01:48 -0000	1.14.2.5
+++ cmMakefileLibraryTargetGenerator.cxx	3 Jan 2007 15:19:03 -0000	1.14.2.6
@@ -17,7 +17,7 @@
 #include "cmMakefileLibraryTargetGenerator.h"
 
 #include "cmGeneratedFileStream.h"
-#include "cmGlobalGenerator.h"
+#include "cmGlobalUnixMakefileGenerator3.h"
 #include "cmLocalUnixMakefileGenerator3.h"
 #include "cmMakefile.h"
 #include "cmSourceFile.h"

Index: cmMakefileTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.h,v
retrieving revision 1.6.2.3
retrieving revision 1.6.2.4
diff -u -d -r1.6.2.3 -r1.6.2.4
--- cmMakefileTargetGenerator.h	13 Oct 2006 14:52:06 -0000	1.6.2.3
+++ cmMakefileTargetGenerator.h	3 Jan 2007 15:19:03 -0000	1.6.2.4
@@ -23,7 +23,7 @@
 class cmDependInformation;
 class cmDepends;
 class cmGeneratedFileStream;
-class cmGlobalGenerator;
+class cmGlobalUnixMakefileGenerator3;
 class cmLocalUnixMakefileGenerator3;
 class cmMakeDepend;
 class cmMakefile;
@@ -121,7 +121,7 @@
   cmStdString TargetName;
   cmTarget *Target;
   cmLocalUnixMakefileGenerator3 *LocalGenerator;
-  cmGlobalGenerator *GlobalGenerator;
+  cmGlobalUnixMakefileGenerator3 *GlobalGenerator;
   cmMakefile *Makefile;
 
   bool DriveCustomCommandsOnDepends;

Index: cmMakefileExecutableTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileExecutableTargetGenerator.cxx,v
retrieving revision 1.12.2.7
retrieving revision 1.12.2.8
diff -u -d -r1.12.2.7 -r1.12.2.8
--- cmMakefileExecutableTargetGenerator.cxx	27 Oct 2006 20:01:48 -0000	1.12.2.7
+++ cmMakefileExecutableTargetGenerator.cxx	3 Jan 2007 15:19:03 -0000	1.12.2.8
@@ -17,7 +17,7 @@
 #include "cmMakefileExecutableTargetGenerator.h"
 
 #include "cmGeneratedFileStream.h"
-#include "cmGlobalGenerator.h"
+#include "cmGlobalUnixMakefileGenerator3.h"
 #include "cmLocalUnixMakefileGenerator3.h"
 #include "cmMakefile.h"
 #include "cmSourceFile.h"

Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.16.2.8
retrieving revision 1.16.2.9
diff -u -d -r1.16.2.8 -r1.16.2.9
--- cmMakefileTargetGenerator.cxx	28 Nov 2006 19:19:44 -0000	1.16.2.8
+++ cmMakefileTargetGenerator.cxx	3 Jan 2007 15:19:03 -0000	1.16.2.9
@@ -65,7 +65,8 @@
   result->TargetName = tgtName;
   result->Target = tgt;
   result->LocalGenerator = lg;
-  result->GlobalGenerator = lg->GetGlobalGenerator();
+  result->GlobalGenerator =
+    static_cast<cmGlobalUnixMakefileGenerator3*>(lg->GetGlobalGenerator());
   result->Makefile = lg->GetMakefile();
   return result;
 }
@@ -891,9 +892,7 @@
   depends.clear();
   depends.push_back(*o);
   commands.clear();
-  cmGlobalUnixMakefileGenerator3* gg =
-    static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
-  std::string emptyCommand = gg->GetEmptyCommandHack();
+  std::string emptyCommand = this->GlobalGenerator->GetEmptyCommandHack();
   if(!emptyCommand.empty())
     {
     commands.push_back(emptyCommand);
@@ -911,7 +910,8 @@
     this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
                                         o->c_str(), depends, commands,
                                         symbolic);
-    gg->AddMultipleOutputPair(o->c_str(), depends[0].c_str());
+    this->GlobalGenerator->AddMultipleOutputPair(o->c_str(),
+                                                 depends[0].c_str());
     }
 }
 

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CMakeLists.txt,v
retrieving revision 1.289.2.7
retrieving revision 1.289.2.8
diff -u -d -r1.289.2.7 -r1.289.2.8
--- CMakeLists.txt	30 Nov 2006 15:12:56 -0000	1.289.2.7
+++ CMakeLists.txt	3 Jan 2007 15:19:03 -0000	1.289.2.8
@@ -402,6 +402,7 @@
     --test-command ${CMAKE_CMAKE_COMMAND} -E compare_files 
     ${CMake_SOURCE_DIR}/Tests/TargetName/scripts/hello_world
     ${CMake_BINARY_DIR}/Tests/TargetName/scripts/hello_world)
+
   ADD_TEST(LibName ${CMAKE_CTEST_COMMAND}
     --build-and-test
     "${CMake_SOURCE_DIR}/Tests/LibName"
@@ -414,6 +415,18 @@
     --test-command foobar
     )
 
+  ADD_TEST(CustComDepend ${CMAKE_CTEST_COMMAND}
+    --build-and-test
+    "${CMake_SOURCE_DIR}/Tests/CustComDepend"
+    "${CMake_BINARY_DIR}/Tests/CustComDepend"
+    --build-two-config
+    --build-generator ${CMAKE_TEST_GENERATOR}
+    --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+    --build-project CustComDepend 
+    --build-exe-dir "${CMake_BINARY_DIR}/Tests/CustComDepend/bin"
+    --test-command foo bar.c
+    )
+
   ADD_TEST(CustomCommand  ${CMAKE_CTEST_COMMAND}
     --build-and-test 
     "${CMake_SOURCE_DIR}/Tests/CustomCommand"

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.96.2.7
retrieving revision 1.96.2.8
diff -u -d -r1.96.2.7 -r1.96.2.8
--- cmTarget.cxx	30 Nov 2006 23:13:49 -0000	1.96.2.7
+++ cmTarget.cxx	3 Jan 2007 15:19:03 -0000	1.96.2.8
@@ -253,6 +253,8 @@
             tLocation = cmSystemTools::GetFilenamePath(tLocation);
             std::string depLocation = cmSystemTools::GetFilenamePath(
               std::string(fullName));
+            depLocation = cmSystemTools::CollapseFullPath(depLocation.c_str());
+            tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
             if(depLocation == tLocation)
               {
               isUtility = true;



More information about the Cmake-commits mailing list