Browse Source

cmGlobalGenerator: Create a new Compute step before generation.

Replace the DoGenerate method.
Stephen Kelly 10 years ago
parent
commit
29e8b7bfcc
3 changed files with 5 additions and 7 deletions
  1. 1 3
      Source/cmGlobalGenerator.cxx
  2. 2 3
      Source/cmGlobalGenerator.h
  3. 2 1
      Source/cmake.cxx

+ 1 - 3
Source/cmGlobalGenerator.cxx

@@ -1212,7 +1212,7 @@ bool cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const
   return false;
 }
 
-void cmGlobalGenerator::DoGenerate()
+void cmGlobalGenerator::Compute()
 {
   // Some generators track files replaced during the Generate.
   // Start with an empty vector:
@@ -1220,8 +1220,6 @@ void cmGlobalGenerator::DoGenerate()
 
   // clear targets to issue warning CMP0042 for
   this->CMP0042WarnTargets.clear();
-
-  this->Generate();
 }
 
 void cmGlobalGenerator::Generate()

+ 2 - 3
Source/cmGlobalGenerator.h

@@ -86,6 +86,7 @@ public:
    */
   virtual void Configure();
 
+  void Compute();
 
   enum TargetTypes {
     AllTargets,
@@ -99,7 +100,7 @@ public:
    * basically creates a series of LocalGenerators for each directory and
    * requests that they Generate.
    */
-  void DoGenerate();
+  virtual void Generate();
 
   /**
    * Set/Get and Clear the enabled languages.
@@ -368,8 +369,6 @@ public:
 
   std::string MakeSilentFlag;
 protected:
-  virtual void Generate();
-
   typedef std::vector<cmLocalGenerator*> GeneratorVector;
   // for a project collect all its targets by following depend
   // information, and also collect all the targets

+ 2 - 1
Source/cmake.cxx

@@ -1607,7 +1607,8 @@ int cmake::Generate()
     {
     return -1;
     }
-  this->GlobalGenerator->DoGenerate();
+  this->GlobalGenerator->Compute();
+  this->GlobalGenerator->Generate();
   if ( !this->GraphVizFile.empty() )
     {
     std::cout << "Generate graphviz: " << this->GraphVizFile << std::endl;