Merge topic 'clean-up-makefile-generators'

036372c4 Remove obsolete overrides of CreateLocalGenerator.
684e5cef cmGlobalGenerator: Host the MakeSilentFlag.
2047144f cmLocalGenerator: Remove unused IgnoreLibPrefix.
333c1fa8 cmGlobalUnixMakefileGenerator3: Host the UnixCD.
a97df5e1 cmGlobalUnixMakefileGenerator3: Host the PassMakeflags.
14f171c3 Remove method calls just repeating the default.
cf7f03e5 cmGlobalUnixMakefileGenerator3: Host the DefineWindowsNULL.
e9b134b9 cmGlobalUnixMakefileGenerator3: Host the include directive.
24613d8b cmLocalGenerator: Remove unused method.
b659d161 cmGlobalGenerator: Add NVI wrapper to create local generator.
This commit is contained in:
Brad King 2015-05-19 11:09:31 -04:00 committed by CMake Topic Stage
commit 93acb504c0
32 changed files with 68 additions and 166 deletions

View File

@ -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 != "/" )

View File

@ -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");

View File

@ -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";

View File

@ -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);

View File

@ -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());

View File

@ -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) )
{

View File

@ -22,6 +22,10 @@ cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator()
this->ToolSupportsColor = true;
this->UseLinkScript = false;
this->WindowsShell = true;
this->IncludeDirective = "!include";
this->DefineWindowsNULL = true;
this->PassMakeflags = true;
this->UnixCD = false;
}
@ -43,11 +47,7 @@ cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator(
{
cmLocalUnixMakefileGenerator3* lg =
new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetIncludeDirective("!include");
lg->SetDefineWindowsNULL(true);
lg->SetMakefileVariableSize(32);
lg->SetPassMakeflags(true);
lg->SetUnixCD(false);
lg->SetMakeCommandEscapeTargetTwice(true);
lg->SetBorlandMakeCurlyHack(true);
return lg;

View File

@ -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
@ -1881,6 +1881,12 @@ void cmGlobalGenerator::EnableInstallTarget()
this->InstallTargetEnabled = true;
}
cmLocalGenerator *
cmGlobalGenerator::MakeLocalGenerator(cmLocalGenerator *parent)
{
return this->CreateLocalGenerator(parent);
}
cmLocalGenerator *
cmGlobalGenerator::CreateLocalGenerator(cmLocalGenerator *parent)
{

View File

@ -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"; }
@ -354,6 +353,7 @@ public:
cmFileLockPool& GetFileLockPool() { return FileLockPool; }
#endif
std::string MakeSilentFlag;
bool WindowsShell;
bool WindowsVSIDE;
bool WatcomWMake;
@ -442,6 +442,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

View File

@ -21,6 +21,10 @@ cmGlobalJOMMakefileGenerator::cmGlobalJOMMakefileGenerator()
this->UseLinkScript = false;
this->WindowsShell = true;
this->NMake = true;
this->DefineWindowsNULL = true;
this->PassMakeflags = true;
this->UnixCD = false;
this->MakeSilentFlag = "/nologo";
}
void cmGlobalJOMMakefileGenerator
@ -46,20 +50,6 @@ void cmGlobalJOMMakefileGenerator
this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *
cmGlobalJOMMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalUnixMakefileGenerator3* lg
= new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetDefineWindowsNULL(true);
lg->SetMakeSilentFlag("/nologo");
lg->SetIgnoreLibPrefix(true);
lg->SetPassMakeflags(true);
lg->SetUnixCD(false);
return lg;
}
//----------------------------------------------------------------------------
void cmGlobalJOMMakefileGenerator
::GetDocumentation(cmDocumentationEntry& entry)

View File

@ -36,9 +36,6 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library
* extension, pthreads, byte order etc.

View File

@ -93,18 +93,6 @@ void cmGlobalMSYSMakefileGenerator
}
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *
cmGlobalMSYSMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalUnixMakefileGenerator3* lg =
new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetIgnoreLibPrefix(true);
lg->SetPassMakeflags(false);
lg->SetUnixCD(true);
return lg;
}
//----------------------------------------------------------------------------
void cmGlobalMSYSMakefileGenerator
::GetDocumentation(cmDocumentationEntry& entry)

View File

@ -35,9 +35,6 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library
* extension, pthreads, byte order etc.

View File

@ -58,18 +58,6 @@ void cmGlobalMinGWMakefileGenerator
this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *
cmGlobalMinGWMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalUnixMakefileGenerator3* lg =
new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetIgnoreLibPrefix(true);
lg->SetPassMakeflags(false);
lg->SetUnixCD(true);
return lg;
}
//----------------------------------------------------------------------------
void cmGlobalMinGWMakefileGenerator
::GetDocumentation(cmDocumentationEntry& entry)

View File

@ -34,9 +34,6 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library
* extension, pthreads, byte order etc.

View File

@ -21,6 +21,10 @@ cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator()
this->UseLinkScript = false;
this->WindowsShell = true;
this->NMake = true;
this->DefineWindowsNULL = true;
this->PassMakeflags = true;
this->UnixCD = false;
this->MakeSilentFlag = "/nologo";
}
void cmGlobalNMakeMakefileGenerator
@ -46,20 +50,6 @@ void cmGlobalNMakeMakefileGenerator
this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *
cmGlobalNMakeMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalUnixMakefileGenerator3* lg =
new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetDefineWindowsNULL(true);
lg->SetMakeSilentFlag("/nologo");
lg->SetIgnoreLibPrefix(true);
lg->SetPassMakeflags(true);
lg->SetUnixCD(false);
return lg;
}
//----------------------------------------------------------------------------
void cmGlobalNMakeMakefileGenerator
::GetDocumentation(cmDocumentationEntry& entry)

View File

@ -34,9 +34,6 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library
* extension, pthreads, byte order etc.

View File

@ -33,6 +33,11 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3()
this->UseLinkScript = true;
#endif
this->CommandDatabase = NULL;
this->IncludeDirective = "include";
this->DefineWindowsNULL = false;
this->PassMakeflags = false;
this->UnixCD = true;
}
void cmGlobalUnixMakefileGenerator3
@ -580,7 +585,7 @@ void cmGlobalUnixMakefileGenerator3
else
{
lg = static_cast<cmLocalUnixMakefileGenerator3 *>
(this->CreateLocalGenerator());
(this->MakeLocalGenerator());
// set the Start directories
lg->GetMakefile()->SetCurrentSourceDirectory
(this->CMakeInstance->GetHomeDirectory());

View File

@ -132,6 +132,11 @@ public:
virtual bool AllowDeleteOnError() const { return true; }
virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const;
std::string IncludeDirective;
bool DefineWindowsNULL;
bool PassMakeflags;
bool UnixCD;
protected:
void WriteMainMakefile2();
void WriteMainCMakefile();

View File

@ -26,6 +26,10 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
this->WindowsShell = true;
#endif
this->WatcomWMake = true;
this->IncludeDirective = "!include";
this->DefineWindowsNULL = true;
this->UnixCD = false;
this->MakeSilentFlag = "-h";
}
void cmGlobalWatcomWMakeGenerator
@ -44,21 +48,6 @@ void cmGlobalWatcomWMakeGenerator
this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *
cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalUnixMakefileGenerator3* lg
= new cmLocalUnixMakefileGenerator3(this, parent);
lg->SetDefineWindowsNULL(true);
lg->SetMakeSilentFlag("-h");
lg->SetIgnoreLibPrefix(true);
lg->SetPassMakeflags(false);
lg->SetUnixCD(false);
lg->SetIncludeDirective("!include");
return lg;
}
//----------------------------------------------------------------------------
void cmGlobalWatcomWMakeGenerator
::GetDocumentation(cmDocumentationEntry& entry)

View File

@ -34,9 +34,6 @@ public:
/** Get the documentation entry for this generator. */
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library
* extension, pthreads, byte order etc.

View File

@ -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;

View File

@ -62,7 +62,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
this->Makefile = new cmMakefile(this);
this->LinkScriptShell = false;
this->IgnoreLibPrefix = false;
this->UseRelativePaths = false;
this->Configured = false;
this->EmitUniversalBinaryFlags = true;

View File

@ -470,7 +470,6 @@ protected:
bool LinkScriptShell;
bool UseRelativePaths;
bool IgnoreLibPrefix;
bool Configured;
bool EmitUniversalBinaryFlags;

View File

@ -83,12 +83,7 @@ cmLocalUnixMakefileGenerator3::
cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmLocalGenerator* parent)
: cmLocalGenerator(gg, parent)
{
this->IncludeDirective = "include";
this->MakefileVariableSize = 0;
this->IgnoreLibPrefix = false;
this->PassMakeflags = false;
this->DefineWindowsNULL = false;
this->UnixCD = true;
this->ColorMakefile = false;
this->SkipPreprocessedSourceRules = false;
this->SkipAssemblySourceRules = false;
@ -720,7 +715,9 @@ cmLocalUnixMakefileGenerator3
makefileStream
<< "# Set environment variables for the build.\n"
<< "\n";
if(this->DefineWindowsNULL)
cmGlobalUnixMakefileGenerator3* gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
if(gg->DefineWindowsNULL)
{
makefileStream
<< "!IF \"$(OS)\" == \"Windows_NT\"\n"
@ -2143,10 +2140,12 @@ cmLocalUnixMakefileGenerator3
cmd += this->Convert(makefile,NONE,SHELL);
cmd += " ";
cmGlobalUnixMakefileGenerator3* gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
// Pass down verbosity level.
if(!this->GetMakeSilentFlag().empty())
if(!gg->MakeSilentFlag.empty())
{
cmd += this->GetMakeSilentFlag();
cmd += gg->MakeSilentFlag;
cmd += " ";
}
@ -2154,7 +2153,7 @@ cmLocalUnixMakefileGenerator3
// sub-invoked makes via an environment variable. However, some
// makes do not support that, so you have to pass the flags
// explicitly.
if(this->GetPassMakeflags())
if(gg->PassMakeflags)
{
cmd += "-$(MAKEFLAGS) ";
}
@ -2346,7 +2345,9 @@ void cmLocalUnixMakefileGenerator3
// support changing the drive letter with just "d:").
const char* cd_cmd = this->IsMinGWMake() ? "cd /d " : "cd ";
if(!this->UnixCD)
cmGlobalUnixMakefileGenerator3* gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
if(!gg->UnixCD)
{
// On Windows we must perform each step separately and then change
// back because the shell keeps the working directory between

View File

@ -66,52 +66,11 @@ public:
// write the main variables used by the makefiles
void WriteMakeVariables(std::ostream& makefileStream);
/**
* If true, then explicitly pass MAKEFLAGS on the make all target for makes
* that do not use environment variables.
*
*/
void SetPassMakeflags(bool s){this->PassMakeflags = s;}
bool GetPassMakeflags() { return this->PassMakeflags; }
/**
* Set the flag used to keep the make program silent.
*/
void SetMakeSilentFlag(const std::string& s) { this->MakeSilentFlag = s; }
std::string &GetMakeSilentFlag() { return this->MakeSilentFlag; }
/**
* If set to true, then NULL is set to nil for non Windows_NT.
* This uses make syntax used by nmake and borland.
* The default is false.
*/
void SetDefineWindowsNULL(bool v) {this->DefineWindowsNULL = v;}
/**
* If set to true, cd dir && command is used to
* run commands in a different directory.
*/
void SetUnixCD(bool v) {this->UnixCD = v;}
/**
* Set the string used to include one makefile into another default
* is include.
*/
void SetIncludeDirective(const std::string& s)
{ this->IncludeDirective = s; }
const std::string& GetIncludeDirective() { return this->IncludeDirective; }
/**
* Set max makefile variable size, default is 0 which means unlimited.
*/
void SetMakefileVariableSize(int s) { this->MakefileVariableSize = s; }
/**
* If ignore lib prefix is true, then do not strip lib from the name
* of a library.
*/
void SetIgnoreLibPrefix(bool s) { this->IgnoreLibPrefix = s; }
/**
* Set whether passing a make target on a command line requires an
* extra level of escapes.
@ -303,12 +262,7 @@ private:
//==========================================================================
// Configuration settings.
int MakefileVariableSize;
std::string IncludeDirective;
std::string MakeSilentFlag;
std::string ConfigurationName;
bool DefineWindowsNULL;
bool UnixCD;
bool PassMakeflags;
bool MakeCommandEscapeTargetTwice;
bool BorlandMakeCurlyHack;
//==========================================================================

View File

@ -1698,7 +1698,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

View File

@ -226,7 +226,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
dependFileNameFull += "/depend.make";
*this->BuildFileStream
<< "# Include any dependencies generated for this target.\n"
<< this->LocalGenerator->IncludeDirective << " " << root
<< this->GlobalGenerator->IncludeDirective << " " << root
<< this->Convert(dependFileNameFull,
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE)
@ -237,7 +237,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
// Include the progress variables for the target.
*this->BuildFileStream
<< "# Include the progress variables for this target.\n"
<< this->LocalGenerator->IncludeDirective << " " << root
<< this->GlobalGenerator->IncludeDirective << " " << root
<< this->Convert(this->ProgressFileNameFull,
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE)
@ -270,7 +270,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
// Include the flags for the target.
*this->BuildFileStream
<< "# Include the compile flags for this target's objects.\n"
<< this->LocalGenerator->IncludeDirective << " " << root
<< this->GlobalGenerator->IncludeDirective << " " << root
<< this->Convert(this->FlagFileNameFull,
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE)

View File

@ -51,7 +51,7 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
// Include the progress variables for the target.
*this->BuildFileStream
<< "# Include the progress variables for this target.\n"
<< this->LocalGenerator->IncludeDirective << " " << root
<< this->GlobalGenerator->IncludeDirective << " " << root
<< this->Convert(this->ProgressFileNameFull,
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKERULE)

View File

@ -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);

View File

@ -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);
}
}

View File

@ -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);