[cmake-commits] alex committed cmGlobalGenerator.cxx 1.174 1.175 cmGlobalGenerator.h 1.74 1.75 cmLocalGenerator.h 1.79 1.80 cmLocalVisualStudio6Generator.cxx 1.121 1.122 cmLocalVisualStudio6Generator.h 1.17 1.18 cmLocalVisualStudio7Generator.cxx 1.189 1.190 cmLocalVisualStudio7Generator.h 1.38 1.39

cmake-commits at cmake.org cmake-commits at cmake.org
Wed May 9 14:41:40 EDT 2007


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

Modified Files:
	cmGlobalGenerator.cxx cmGlobalGenerator.h cmLocalGenerator.h 
	cmLocalVisualStudio6Generator.cxx 
	cmLocalVisualStudio6Generator.h 
	cmLocalVisualStudio7Generator.cxx 
	cmLocalVisualStudio7Generator.h 
Log Message:

BUG: fix problem for non-C/CXX languages with Visual Studio, the
dependencies for the custom commands added for java were not handled
correctly. Needs more work.

Alex


Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -d -r1.189 -r1.190
--- cmLocalVisualStudio7Generator.cxx	9 May 2007 14:18:31 -0000	1.189
+++ cmLocalVisualStudio7Generator.cxx	9 May 2007 18:41:38 -0000	1.190
@@ -42,8 +42,7 @@
 {
 }
 
-
-void cmLocalVisualStudio7Generator::Generate()
+void cmLocalVisualStudio7Generator::AddHelperCommands()
 {
   std::set<cmStdString> lang;
   lang.insert("C");
@@ -53,6 +52,10 @@
   lang.insert("DEF");
   this->CreateCustomTargetsAndCommands(lang);
   this->FixGlobalTargets();
+}
+
+void cmLocalVisualStudio7Generator::Generate()
+{
   this->OutputVCProjFile();
 }
 

Index: cmLocalVisualStudio6Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- cmLocalVisualStudio6Generator.h	9 May 2007 12:25:45 -0000	1.17
+++ cmLocalVisualStudio6Generator.h	9 May 2007 18:41:38 -0000	1.18
@@ -38,7 +38,9 @@
   cmLocalVisualStudio6Generator();
 
   virtual ~cmLocalVisualStudio6Generator();
-  
+
+  virtual void AddHelperCommands();
+
   /**
    * Generate the makefile for this directory. 
    */

Index: cmLocalVisualStudio7Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- cmLocalVisualStudio7Generator.h	9 May 2007 12:25:45 -0000	1.38
+++ cmLocalVisualStudio7Generator.h	9 May 2007 18:41:38 -0000	1.39
@@ -41,7 +41,9 @@
   cmLocalVisualStudio7Generator();
 
   virtual ~cmLocalVisualStudio7Generator();
-  
+
+  virtual void AddHelperCommands();
+
   /**
    * Generate the makefile for this directory. 
    */

Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- cmGlobalGenerator.h	9 May 2007 12:25:45 -0000	1.74
+++ cmGlobalGenerator.h	9 May 2007 18:41:38 -0000	1.75
@@ -202,8 +202,6 @@
   void FillProjectMap();
   bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen);
   void FillProjectToTargetMap();
-  // Calls TraceVSDependencies() on all targets
-  void TraceDependencies();
   void CreateDefaultGlobalTargets(cmTargets* targets);
   cmTarget CreateGlobalTarget(const char* name, const char* message,
     const cmCustomCommandLines* commandLines,

Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -d -r1.174 -r1.175
--- cmGlobalGenerator.cxx	9 May 2007 12:25:45 -0000	1.174
+++ cmGlobalGenerator.cxx	9 May 2007 18:41:38 -0000	1.175
@@ -717,14 +717,12 @@
     }
   // at this point this->LocalGenerators has been filled,
   // so create the map from project name to vector of local generators
-  this->FillProjectMap();
+    this->FillProjectMap();
   // now create project to target map 
   // This will make sure that targets have all the 
   // targets they depend on as part of the build.
-  this->FillProjectToTargetMap();
-  // now trace all dependencies
-  this->TraceDependencies();
-  
+    this->FillProjectToTargetMap();
+
   if ( !this->CMakeInstance->GetScriptMode() )
     {
     this->CMakeInstance->UpdateProgress("Configuring done", -1);
@@ -735,6 +733,19 @@
 {
   // For each existing cmLocalGenerator
   unsigned int i;
+ 
+  // Add generator specific helper commands
+  for (i = 0; i < this->LocalGenerators.size(); ++i)
+    {
+    this->LocalGenerators[i]->AddHelperCommands();
+    }
+
+  // Trace the dependencies, after that no custom commands should be added
+  // because their dependencies might not be handled correctly
+  for (i = 0; i < this->LocalGenerators.size(); ++i)
+    {
+    this->LocalGenerators[i]->TraceDependencies();
+    }
 
   // Consolidate global targets
   cmTargets globalTargets;
@@ -1043,14 +1054,6 @@
   return "None";
 }
 
-void cmGlobalGenerator::TraceDependencies()
-{ 
-  for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
-    {
-    this->LocalGenerators[i]->TraceDependencies();
-    }
-}
-
 void cmGlobalGenerator::FillProjectMap()
 { 
   this->ProjectMap.clear(); // make sure we start with a clean map

Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- cmLocalVisualStudio6Generator.cxx	9 May 2007 12:25:45 -0000	1.121
+++ cmLocalVisualStudio6Generator.cxx	9 May 2007 18:41:38 -0000	1.122
@@ -32,13 +32,16 @@
 {
 }
 
-
-void cmLocalVisualStudio6Generator::Generate()
-{ 
+void cmLocalVisualStudio6Generator::AddHelperCommands()
+{
   std::set<cmStdString> lang;
   lang.insert("C");
   lang.insert("CXX");
   this->CreateCustomTargetsAndCommands(lang);
+}
+
+void cmLocalVisualStudio6Generator::Generate()
+{
   this->OutputDSPFile();
 }
 

Index: cmLocalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.h,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- cmLocalGenerator.h	9 May 2007 12:25:45 -0000	1.79
+++ cmLocalGenerator.h	9 May 2007 18:41:38 -0000	1.80
@@ -54,7 +54,9 @@
    * Calls TraceVSDependencies() on all targets of this generator.
    */
   virtual void TraceDependencies();
-  
+
+  virtual void AddHelperCommands() {}
+
   /**
    * Perform any final calculations prior to generation
    */



More information about the Cmake-commits mailing list