summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-16 03:18:25 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-16 03:18:25 (GMT)
commitb659d161da3c488890e32fbb1acf1295186d3c4f (patch)
tree8040267cd45e39fcc0f70480eac8f5328c0e2c8d /Source
parent2e4ea0c055e01e10c8f459398f943b1b62c5c7bb (diff)
downloadCMake-b659d161da3c488890e32fbb1acf1295186d3c4f.zip
CMake-b659d161da3c488890e32fbb1acf1295186d3c4f.tar.gz
CMake-b659d161da3c488890e32fbb1acf1295186d3c4f.tar.bz2
cmGlobalGenerator: Add NVI wrapper to create local generator.
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx2
-rw-r--r--Source/CPack/cpack.cxx2
-rw-r--r--Source/CTest/cmCTestLaunch.cxx2
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx2
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
-rw-r--r--Source/cmCTest.cxx2
-rw-r--r--Source/cmGlobalGenerator.cxx8
-rw-r--r--Source/cmGlobalGenerator.h6
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmGraphVizWriter.cxx2
-rw-r--r--Source/cmMakefile.cxx2
-rw-r--r--Source/cmQtAutoGenerators.cxx2
-rw-r--r--Source/cmake.cxx8
-rw-r--r--Source/cmcmd.cxx2
14 files changed, 26 insertions, 18 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index e254e9a..6e30f8c 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -715,7 +715,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
cm.SetProgressCallback(cmCPackGeneratorProgress, this);
cmGlobalGenerator gg;
gg.SetCMakeInstance(&cm);
- cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
cmMakefile *mf = lg->GetMakefile();
std::string realInstallDirectory = tempInstallDirectory;
if ( !installSubDirectory.empty() && installSubDirectory != "/" )
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 2207873..29484cf 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -201,7 +201,7 @@ int main (int argc, char const* const* argv)
cminst.GetState()->RemoveUnscriptableCommands();
cmGlobalGenerator cmgg;
cmgg.SetCMakeInstance(&cminst);
- cmsys::auto_ptr<cmLocalGenerator> cmlg(cmgg.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> cmlg(cmgg.MakeLocalGenerator());
cmMakefile* globalMF = cmlg->GetMakefile();
#if defined(__CYGWIN__)
globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index de6ecde..d3edc80 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -752,7 +752,7 @@ void cmCTestLaunch::LoadConfig()
cmake cm;
cmGlobalGenerator gg;
gg.SetCMakeInstance(&cm);
- cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
cmMakefile* mf = lg->GetMakefile();
std::string fname = this->LogDir;
fname += "CTestLaunchConfig.cmake";
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 0a34be8..7ee9d85 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -340,7 +340,7 @@ void cmCTestScriptHandler::CreateCMake()
this->GlobalGenerator = new cmGlobalGenerator;
this->GlobalGenerator->SetCMakeInstance(this->CMake);
- this->LocalGenerator = this->GlobalGenerator->CreateLocalGenerator();
+ this->LocalGenerator = this->GlobalGenerator->MakeLocalGenerator();
this->Makefile = this->LocalGenerator->GetMakefile();
this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 95cdf3b..5d40f91 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1573,7 +1573,7 @@ void cmCTestTestHandler::GetListOfTests()
cmake cm;
cmGlobalGenerator gg;
gg.SetCMakeInstance(&cm);
- cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
cmMakefile *mf = lg->GetMakefile();
mf->AddDefinition("CTEST_CONFIGURATION_TYPE",
this->CTest->GetConfigType().c_str());
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 403a459..f3c4da5 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -512,7 +512,7 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
cmake cm;
cmGlobalGenerator gg;
gg.SetCMakeInstance(&cm);
- cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
cmMakefile *mf = lg->GetMakefile();
if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(), mf) )
{
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 1c9c475..cf9e6e6 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1099,7 +1099,7 @@ void cmGlobalGenerator::Configure()
this->ClearGeneratorMembers();
// start with this directory
- cmLocalGenerator *lg = this->CreateLocalGenerator();
+ cmLocalGenerator *lg = this->MakeLocalGenerator();
this->LocalGenerators.push_back(lg);
// set the Start directories
@@ -1882,6 +1882,12 @@ void cmGlobalGenerator::EnableInstallTarget()
}
cmLocalGenerator *
+cmGlobalGenerator::MakeLocalGenerator(cmLocalGenerator *parent)
+{
+ return this->CreateLocalGenerator(parent);
+}
+
+cmLocalGenerator *
cmGlobalGenerator::CreateLocalGenerator(cmLocalGenerator *parent)
{
return new cmLocalGenerator(this, parent);
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 3b2a41f..9ac741d 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -52,8 +52,7 @@ public:
cmGlobalGenerator();
virtual ~cmGlobalGenerator();
- ///! Create a local generator appropriate to this Global Generator
- virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
+ cmLocalGenerator* MakeLocalGenerator(cmLocalGenerator* parent = 0);
///! Get the name for this generator
virtual std::string GetName() const { return "Generic"; }
@@ -442,6 +441,9 @@ protected:
virtual bool UseFolderProperty();
private:
+ ///! Create a local generator appropriate to this Global Generator
+ virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent);
+
cmMakefile* TryCompileOuterMakefile;
float FirstTimeProgress;
// If you add a new map here, make sure it is copied
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index a4df493..181f4c0 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -580,7 +580,7 @@ void cmGlobalUnixMakefileGenerator3
else
{
lg = static_cast<cmLocalUnixMakefileGenerator3 *>
- (this->CreateLocalGenerator());
+ (this->MakeLocalGenerator());
// set the Start directories
lg->GetMakefile()->SetCurrentSourceDirectory
(this->CMakeInstance->GetHomeDirectory());
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index 99542a9..7cad8a1 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -67,7 +67,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
cmake cm;
cmGlobalGenerator ggi;
ggi.SetCMakeInstance(&cm);
- cmsys::auto_ptr<cmLocalGenerator> lg(ggi.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(ggi.MakeLocalGenerator());
cmMakefile *mf = lg->GetMakefile();
const char* inFileName = settingsFileName;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7b8d3af..2d855ee 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1706,7 +1706,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
// create a new local generator and set its parent
cmLocalGenerator *lg2 = this->GetGlobalGenerator()
- ->CreateLocalGenerator(this->LocalGenerator);
+ ->MakeLocalGenerator(this->LocalGenerator);
this->GetGlobalGenerator()->AddLocalGenerator(lg2);
// set the subdirs start dirs
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 457de11..983f234 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -1212,7 +1212,7 @@ static cmGlobalGenerator* CreateGlobalGenerator(cmake* cm,
cm->SetHomeOutputDirectory(targetDirectory);
cm->SetHomeDirectory(targetDirectory);
- cmLocalGenerator* lg = gg->CreateLocalGenerator();
+ cmLocalGenerator* lg = gg->MakeLocalGenerator();
lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory);
lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory);
gg->SetCurrentLocalGenerator(lg);
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 5c5c428..c5a98d5 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -376,7 +376,7 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
std::string homeOutputDir = this->GetHomeOutputDirectory();
this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
- cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator());
lg->GetMakefile()->SetCurrentBinaryDirectory
(cmSystemTools::GetCurrentWorkingDirectory());
lg->GetMakefile()->SetCurrentSourceDirectory
@@ -418,7 +418,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
this->SetGlobalGenerator(gg);
// read in the list file to fill the cache
- cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator());
cmMakefile* mf = lg->GetMakefile();
mf->SetCurrentBinaryDirectory
(cmSystemTools::GetCurrentWorkingDirectory());
@@ -1927,7 +1927,7 @@ int cmake::CheckBuildSystem()
cmake cm;
cmGlobalGenerator gg;
gg.SetCMakeInstance(&cm);
- cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
cmMakefile* mf = lg->GetMakefile();
if(!mf->ReadListFile(this->CheckBuildSystemArgument.c_str()) ||
cmSystemTools::GetErrorOccuredFlag())
@@ -1957,7 +1957,7 @@ int cmake::CheckBuildSystem()
ggd(this->CreateGlobalGenerator(genName));
if(ggd.get())
{
- cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->MakeLocalGenerator());
lgd->ClearDependencies(mf, verbose);
}
}
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 12bb8ee..3400625 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -646,7 +646,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
if(cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen))
{
cm.SetGlobalGenerator(ggd);
- cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator());
+ cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->MakeLocalGenerator());
lgd->GetMakefile()->SetCurrentSourceDirectory(startDir);
lgd->GetMakefile()->SetCurrentBinaryDirectory(startOutDir);