cmLocalGenerator: Require a parent in the constructor.

Pass the parent though cmGlobalGenerator::CreateLocalGenerator.

This will make it easy to initialize state scopes independent of
cmMakefile.
This commit is contained in:
Stephen Kelly 2015-04-28 07:50:52 +02:00
parent e4c78b37ce
commit a48aebcb67
59 changed files with 132 additions and 86 deletions

View File

@ -37,9 +37,11 @@ void cmGlobalBorlandMakefileGenerator
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator()
cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator(
cmLocalGenerator* parent)
{
cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
cmLocalUnixMakefileGenerator3* lg =
new cmLocalUnixMakefileGenerator3(parent);
lg->SetIncludeDirective("!include");
lg->SetWindowsShell(true);
lg->SetDefineWindowsNULL(true);

View File

@ -36,7 +36,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library

View File

@ -1878,9 +1878,10 @@ void cmGlobalGenerator::EnableInstallTarget()
this->InstallTargetEnabled = true;
}
cmLocalGenerator *cmGlobalGenerator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalGenerator::CreateLocalGenerator(cmLocalGenerator *parent)
{
cmLocalGenerator *lg = new cmLocalGenerator;
cmLocalGenerator *lg = new cmLocalGenerator(parent);
lg->SetGlobalGenerator(this);
return lg;
}

View File

@ -53,7 +53,7 @@ public:
virtual ~cmGlobalGenerator();
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
///! Get the name for this generator
virtual std::string GetName() const { return "Generic"; }

View File

@ -32,9 +32,10 @@ cmGlobalGhsMultiGenerator::~cmGlobalGhsMultiGenerator()
cmDeleteAll(TargetFolderBuildStreams);
}
cmLocalGenerator *cmGlobalGhsMultiGenerator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalGhsMultiGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalGenerator *lg = new cmLocalGhsMultiGenerator;
cmLocalGenerator *lg = new cmLocalGhsMultiGenerator(parent);
lg->SetGlobalGenerator(this);
this->SetCurrentLocalGenerator(lg);
return lg;

View File

@ -31,7 +31,7 @@ public:
{ return new cmGlobalGeneratorSimpleFactory<cmGlobalGhsMultiGenerator>(); }
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/// @return the name of this generator.
static std::string GetActualName() { return "Green Hills MULTI"; }

View File

@ -45,9 +45,11 @@ void cmGlobalJOMMakefileGenerator
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalJOMMakefileGenerator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalJOMMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
cmLocalUnixMakefileGenerator3* lg
= new cmLocalUnixMakefileGenerator3(parent);
lg->SetDefineWindowsNULL(true);
lg->SetWindowsShell(true);
lg->SetMakeSilentFlag("/nologo");

View File

@ -37,7 +37,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library

View File

@ -93,9 +93,11 @@ void cmGlobalMSYSMakefileGenerator
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalMSYSMakefileGenerator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalMSYSMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
cmLocalUnixMakefileGenerator3* lg =
new cmLocalUnixMakefileGenerator3(parent);
lg->SetWindowsShell(false);
lg->SetMSYSShell(true);
lg->SetGlobalGenerator(this);

View File

@ -36,7 +36,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library

View File

@ -31,9 +31,11 @@ void cmGlobalMinGWMakefileGenerator
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalMinGWMakefileGenerator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalMinGWMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
cmLocalUnixMakefileGenerator3* lg =
new cmLocalUnixMakefileGenerator3(parent);
lg->SetWindowsShell(true);
lg->SetGlobalGenerator(this);
lg->SetIgnoreLibPrefix(true);

View File

@ -35,7 +35,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library

View File

@ -45,9 +45,11 @@ void cmGlobalNMakeMakefileGenerator
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalNMakeMakefileGenerator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalNMakeMakefileGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
cmLocalUnixMakefileGenerator3* lg =
new cmLocalUnixMakefileGenerator3(parent);
lg->SetDefineWindowsNULL(true);
lg->SetWindowsShell(true);
lg->SetMakeSilentFlag("/nologo");

View File

@ -35,7 +35,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library

View File

@ -496,9 +496,10 @@ cmGlobalNinjaGenerator::cmGlobalNinjaGenerator()
//----------------------------------------------------------------------------
// Virtual public methods.
cmLocalGenerator* cmGlobalNinjaGenerator::CreateLocalGenerator()
cmLocalGenerator*
cmGlobalNinjaGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalGenerator* lg = new cmLocalNinjaGenerator;
cmLocalGenerator* lg = new cmLocalNinjaGenerator(parent);
lg->SetGlobalGenerator(this);
return lg;
}

View File

@ -171,7 +171,7 @@ public:
virtual ~cmGlobalNinjaGenerator() { }
/// Overloaded methods. @see cmGlobalGenerator::CreateLocalGenerator()
virtual cmLocalGenerator* CreateLocalGenerator();
virtual cmLocalGenerator* CreateLocalGenerator(cmLocalGenerator* parent = 0);
/// Overloaded methods. @see cmGlobalGenerator::GetName().
virtual std::string GetName() const {

View File

@ -53,9 +53,10 @@ void cmGlobalUnixMakefileGenerator3
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalUnixMakefileGenerator3::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalUnixMakefileGenerator3::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalGenerator* lg = new cmLocalUnixMakefileGenerator3;
cmLocalGenerator* lg = new cmLocalUnixMakefileGenerator3(parent);
lg->SetGlobalGenerator(this);
return lg;
}

View File

@ -68,7 +68,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator3
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library

View File

@ -308,10 +308,12 @@ void cmGlobalVisualStudio10Generator::WriteSLNHeader(std::ostream& fout)
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalVisualStudio10Generator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalVisualStudio10Generator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalVisualStudio10Generator* lg =
new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS10);
new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS10,
parent);
lg->SetGlobalGenerator(this);
return lg;
}

View File

@ -46,7 +46,7 @@ public:
);
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library

View File

@ -237,10 +237,12 @@ void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout)
}
//----------------------------------------------------------------------------
cmLocalGenerator *cmGlobalVisualStudio11Generator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalVisualStudio11Generator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalVisualStudio10Generator* lg =
new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS11);
new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS11,
parent);
lg->SetGlobalGenerator(this);
return lg;
}

View File

@ -29,7 +29,7 @@ public:
virtual void WriteSLNHeader(std::ostream& fout);
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
protected:
virtual bool InitializeWindowsPhone(cmMakefile* mf);

View File

@ -217,10 +217,12 @@ void cmGlobalVisualStudio12Generator::WriteSLNHeader(std::ostream& fout)
}
//----------------------------------------------------------------------------
cmLocalGenerator *cmGlobalVisualStudio12Generator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalVisualStudio12Generator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalVisualStudio10Generator* lg =
new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS12);
new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS12,
parent);
lg->SetGlobalGenerator(this);
return lg;
}

View File

@ -29,7 +29,7 @@ public:
virtual void WriteSLNHeader(std::ostream& fout);
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
//in Visual Studio 2013 they detached the MSBuild tools version
//from the .Net Framework version and instead made it have it's own

View File

@ -128,10 +128,12 @@ void cmGlobalVisualStudio14Generator::WriteSLNHeader(std::ostream& fout)
}
//----------------------------------------------------------------------------
cmLocalGenerator *cmGlobalVisualStudio14Generator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalVisualStudio14Generator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalVisualStudio10Generator* lg =
new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS14);
new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS14,
parent);
lg->SetGlobalGenerator(this);
return lg;
}

View File

@ -29,7 +29,7 @@ public:
virtual void WriteSLNHeader(std::ostream& fout);
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
virtual const char* GetToolsVersion() { return "14.0"; }
protected:

View File

@ -170,9 +170,10 @@ cmGlobalVisualStudio6Generator::GenerateBuildCommand(
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalVisualStudio6Generator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalVisualStudio6Generator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalGenerator *lg = new cmLocalVisualStudio6Generator;
cmLocalGenerator *lg = new cmLocalVisualStudio6Generator(parent);
lg->SetGlobalGenerator(this);
return lg;
}

View File

@ -39,7 +39,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library

View File

@ -25,10 +25,12 @@ cmGlobalVisualStudio71Generator::cmGlobalVisualStudio71Generator(
//----------------------------------------------------------------------------
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalVisualStudio71Generator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalVisualStudio71Generator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalVisualStudio7Generator *lg =
new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS71);
new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS71,
parent);
lg->SetExtraFlagTable(this->GetExtraFlagTableVS7());
lg->SetGlobalGenerator(this);
return lg;

View File

@ -37,7 +37,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Where does this version of Visual Studio look for macros for the

View File

@ -250,10 +250,12 @@ void cmGlobalVisualStudio7Generator::GenerateBuildCommand(
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalVisualStudio7Generator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalVisualStudio7Generator *lg =
new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS7);
new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS7,
parent);
lg->SetExtraFlagTable(this->GetExtraFlagTableVS7());
lg->SetGlobalGenerator(this);
return lg;

View File

@ -42,7 +42,7 @@ public:
std::string const& GetPlatformName() const;
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
virtual bool SetSystemName(std::string const& s, cmMakefile* mf);

View File

@ -125,10 +125,12 @@ std::string cmGlobalVisualStudio8Generator::FindDevEnvCommand()
//----------------------------------------------------------------------------
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalVisualStudio8Generator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalVisualStudio7Generator *lg =
new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS8);
new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS8,
parent);
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
lg->SetGlobalGenerator(this);
return lg;

View File

@ -34,7 +34,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *, bool optional);

View File

@ -114,10 +114,12 @@ void cmGlobalVisualStudio9Generator::WriteSLNHeader(std::ostream& fout)
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalVisualStudio9Generator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalVisualStudio9Generator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalVisualStudio7Generator *lg
= new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS9);
= new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS9,
parent);
lg->SetExtraFlagTable(this->GetExtraFlagTableVS8());
lg->SetGlobalGenerator(this);
return lg;

View File

@ -29,7 +29,7 @@ public:
static cmGlobalGeneratorFactory* NewFactory();
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library

View File

@ -41,9 +41,11 @@ void cmGlobalWatcomWMakeGenerator
}
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalWatcomWMakeGenerator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalWatcomWMakeGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
cmLocalUnixMakefileGenerator3* lg
= new cmLocalUnixMakefileGenerator3(parent);
lg->SetDefineWindowsNULL(true);
#ifdef _WIN32
lg->SetWindowsShell(true);

View File

@ -35,7 +35,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library

View File

@ -368,9 +368,10 @@ cmGlobalXCodeGenerator::GenerateBuildCommand(
//----------------------------------------------------------------------------
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalXCodeGenerator::CreateLocalGenerator()
cmLocalGenerator *
cmGlobalXCodeGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
{
cmLocalGenerator *lg = new cmLocalXCodeGenerator;
cmLocalGenerator *lg = new cmLocalXCodeGenerator(parent);
lg->SetGlobalGenerator(this);
return lg;
}

View File

@ -41,7 +41,7 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent = 0);
/**
* Try to determine system information such as shared library

View File

@ -43,10 +43,14 @@
#include <StorageDefs.h>
#endif
cmLocalGenerator::cmLocalGenerator()
cmLocalGenerator::cmLocalGenerator(cmLocalGenerator* parent)
{
this->Makefile = 0; // moved to after set on global
this->Parent = 0;
this->Parent = parent;
if (parent)
{
parent->AddChild(this);
}
this->WindowsShell = false;
this->WindowsVSIDE = false;
this->WatcomWMake = false;

View File

@ -33,7 +33,7 @@ class cmCustomCommandGenerator;
class cmLocalGenerator
{
public:
cmLocalGenerator();
cmLocalGenerator(cmLocalGenerator* parent);
virtual ~cmLocalGenerator();
/**
@ -131,7 +131,6 @@ public:
///! set/get the parent generator
cmLocalGenerator* GetParent() const {return this->Parent;}
void SetParent(cmLocalGenerator* g) { this->Parent = g; g->AddChild(this); }
///! set/get the children
void AddChild(cmLocalGenerator* g) { this->Children.push_back(g); }

View File

@ -16,7 +16,8 @@
#include "cmGhsMultiTargetGenerator.h"
#include "cmGeneratedFileStream.h"
cmLocalGhsMultiGenerator::cmLocalGhsMultiGenerator()
cmLocalGhsMultiGenerator::cmLocalGhsMultiGenerator(cmLocalGenerator* parent)
: cmLocalGenerator(parent)
{
}

View File

@ -25,7 +25,7 @@ class cmGeneratedFileStream;
class cmLocalGhsMultiGenerator : public cmLocalGenerator
{
public:
cmLocalGhsMultiGenerator();
cmLocalGhsMultiGenerator(cmLocalGenerator* parent);
virtual ~cmLocalGhsMultiGenerator();

View File

@ -22,8 +22,8 @@
#include <assert.h>
cmLocalNinjaGenerator::cmLocalNinjaGenerator()
: cmLocalGenerator()
cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmLocalGenerator* parent)
: cmLocalGenerator(parent)
, ConfigName("")
, HomeRelativeOutputPath("")
{

View File

@ -32,7 +32,7 @@ class cmLocalNinjaGenerator : public cmLocalGenerator
{
public:
/// Default constructor.
cmLocalNinjaGenerator();
cmLocalNinjaGenerator(cmLocalGenerator* parent);
/// Destructor.
virtual ~cmLocalNinjaGenerator();

View File

@ -79,7 +79,9 @@ static std::string cmSplitExtension(std::string const& in, std::string& base)
}
//----------------------------------------------------------------------------
cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
cmLocalUnixMakefileGenerator3::
cmLocalUnixMakefileGenerator3(cmLocalGenerator* parent)
: cmLocalGenerator(parent)
{
this->WindowsShell = false;
this->IncludeDirective = "include";

View File

@ -34,7 +34,7 @@ class cmSourceFile;
class cmLocalUnixMakefileGenerator3 : public cmLocalGenerator
{
public:
cmLocalUnixMakefileGenerator3();
cmLocalUnixMakefileGenerator3(cmLocalGenerator* parent);
virtual ~cmLocalUnixMakefileGenerator3();
/**

View File

@ -61,8 +61,9 @@ class cmVS10XMLParser : public cmXMLParser
//----------------------------------------------------------------------------
cmLocalVisualStudio10Generator::cmLocalVisualStudio10Generator(VSVersion v):
cmLocalVisualStudio7Generator(v)
cmLocalVisualStudio10Generator
::cmLocalVisualStudio10Generator(VSVersion v, cmLocalGenerator* parent):
cmLocalVisualStudio7Generator(v, parent)
{
}

View File

@ -25,7 +25,7 @@ class cmLocalVisualStudio10Generator : public cmLocalVisualStudio7Generator
{
public:
///! Set cache only and recurse to false by default.
cmLocalVisualStudio10Generator(VSVersion v);
cmLocalVisualStudio10Generator(VSVersion v, cmLocalGenerator* parent);
virtual ~cmLocalVisualStudio10Generator();

View File

@ -23,8 +23,9 @@
#include <cmsys/RegularExpression.hxx>
#include <cmsys/FStream.hxx>
cmLocalVisualStudio6Generator::cmLocalVisualStudio6Generator():
cmLocalVisualStudioGenerator(VS6)
cmLocalVisualStudio6Generator
::cmLocalVisualStudio6Generator(cmLocalGenerator* parent):
cmLocalVisualStudioGenerator(VS6, parent)
{
}

View File

@ -29,7 +29,7 @@ class cmLocalVisualStudio6Generator : public cmLocalVisualStudioGenerator
{
public:
///! Set cache only and recurse to false by default.
cmLocalVisualStudio6Generator();
cmLocalVisualStudio6Generator(cmLocalGenerator* parent);
virtual ~cmLocalVisualStudio6Generator();

View File

@ -54,8 +54,9 @@ static void cmConvertToWindowsSlash(std::string& s)
}
//----------------------------------------------------------------------------
cmLocalVisualStudio7Generator::cmLocalVisualStudio7Generator(VSVersion v):
cmLocalVisualStudioGenerator(v)
cmLocalVisualStudio7Generator
::cmLocalVisualStudio7Generator(VSVersion v, cmLocalGenerator* parent):
cmLocalVisualStudioGenerator(v, parent)
{
this->ExtraFlagTable = 0;
this->Internal = new cmLocalVisualStudio7GeneratorInternals(this);

View File

@ -35,7 +35,7 @@ class cmLocalVisualStudio7Generator : public cmLocalVisualStudioGenerator
{
public:
///! Set cache only and recurse to false by default.
cmLocalVisualStudio7Generator(VSVersion v);
cmLocalVisualStudio7Generator(VSVersion v, cmLocalGenerator* parent);
virtual ~cmLocalVisualStudio7Generator();

View File

@ -18,7 +18,9 @@
#include "windows.h"
//----------------------------------------------------------------------------
cmLocalVisualStudioGenerator::cmLocalVisualStudioGenerator(VSVersion v)
cmLocalVisualStudioGenerator
::cmLocalVisualStudioGenerator(VSVersion v, cmLocalGenerator* parent)
: cmLocalGenerator(parent)
{
this->WindowsShell = true;
this->WindowsVSIDE = true;

View File

@ -45,7 +45,7 @@ public:
VS14 = 140
};
cmLocalVisualStudioGenerator(VSVersion v);
cmLocalVisualStudioGenerator(VSVersion v, cmLocalGenerator* parent);
virtual ~cmLocalVisualStudioGenerator();
/** Construct a script from the given list of command lines. */

View File

@ -15,7 +15,8 @@
#include "cmMakefile.h"
//----------------------------------------------------------------------------
cmLocalXCodeGenerator::cmLocalXCodeGenerator()
cmLocalXCodeGenerator::cmLocalXCodeGenerator(cmLocalGenerator* parent)
: cmLocalGenerator(parent)
{
// the global generator does this, so do not
// put these flags into the language flags

View File

@ -24,7 +24,7 @@ class cmLocalXCodeGenerator : public cmLocalGenerator
{
public:
///! Set cache only and recurse to false by default.
cmLocalXCodeGenerator();
cmLocalXCodeGenerator(cmLocalGenerator* parent);
virtual ~cmLocalXCodeGenerator();
virtual std::string GetTargetDirectory(cmTarget const& target) const;

View File

@ -1617,8 +1617,8 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
// create a new local generator and set its parent
cmLocalGenerator *lg2 =
this->LocalGenerator->GetGlobalGenerator()->CreateLocalGenerator();
lg2->SetParent(this->LocalGenerator);
this->LocalGenerator->GetGlobalGenerator()
->CreateLocalGenerator(this->LocalGenerator);
this->LocalGenerator->GetGlobalGenerator()->AddLocalGenerator(lg2);
// set the subdirs start dirs