summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-07-25 16:43:28 (GMT)
committerBrad King <brad.king@kitware.com>2015-07-29 14:43:33 (GMT)
commit29e8b7bfcc8b3530fb4fd2dd04dca59744588b61 (patch)
treeb86ad62c98a940913e5451aad43a3caf37515a87
parent1ef9b2b6007356ab26cdec42bdf9c79d53745bf6 (diff)
downloadCMake-29e8b7bfcc8b3530fb4fd2dd04dca59744588b61.zip
CMake-29e8b7bfcc8b3530fb4fd2dd04dca59744588b61.tar.gz
CMake-29e8b7bfcc8b3530fb4fd2dd04dca59744588b61.tar.bz2
cmGlobalGenerator: Create a new Compute step before generation.
Replace the DoGenerate method.
-rw-r--r--Source/cmGlobalGenerator.cxx4
-rw-r--r--Source/cmGlobalGenerator.h5
-rw-r--r--Source/cmake.cxx3
3 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 06777e6..390d6b4 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/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()
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index fe99a00..9c36cca 100644
--- a/Source/cmGlobalGenerator.h
+++ b/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
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 9d2c19e..619374e 100644
--- a/Source/cmake.cxx
+++ b/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;