summaryrefslogtreecommitdiff
path: root/Source/cmGlobalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 0d4ee151a5..cf4fd69e13 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -60,9 +60,9 @@ void cmGlobalUnixMakefileGenerator3
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator* cmGlobalUnixMakefileGenerator3::CreateLocalGenerator(
- cmState::Snapshot snapshot)
+ cmMakefile* mf)
{
- return new cmLocalUnixMakefileGenerator3(this, snapshot);
+ return new cmLocalUnixMakefileGenerator3(this, mf);
}
//----------------------------------------------------------------------------
@@ -577,17 +577,20 @@ void cmGlobalUnixMakefileGenerator3
makeOptions.begin(), makeOptions.end());
if (!targetName.empty())
{
+ cmMakefile* mf;
cmLocalUnixMakefileGenerator3 *lg;
if (!this->LocalGenerators.empty())
{
lg = static_cast<cmLocalUnixMakefileGenerator3 *>
(this->LocalGenerators[0]);
+ mf = lg->GetMakefile();
}
else
{
cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot();
+ mf = new cmMakefile(this, snapshot);
lg = static_cast<cmLocalUnixMakefileGenerator3 *>
- (this->CreateLocalGenerator(snapshot));
+ (this->CreateLocalGenerator(mf));
// set the Start directories
lg->GetMakefile()->SetCurrentSourceDirectory
(this->CMakeInstance->GetHomeDirectory());
@@ -606,6 +609,7 @@ void cmGlobalUnixMakefileGenerator3
if (this->LocalGenerators.empty())
{
delete lg;
+ delete mf;
}
}
}