summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-06 07:17:45 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-06 07:35:55 (GMT)
commit1981c9718b7099670b03535a241c735477d6bc6c (patch)
tree2fc407c949d1e1ddce5340ce401ce8068be9e2ae /Source
parent353e422b2ad3d51dfc6c6db968ebcece10cbcc8d (diff)
downloadCMake-1981c9718b7099670b03535a241c735477d6bc6c.zip
CMake-1981c9718b7099670b03535a241c735477d6bc6c.tar.gz
CMake-1981c9718b7099670b03535a241c735477d6bc6c.tar.bz2
cmMakefile: Simplify InitializeFromParent method.
Provide a parent instead of requiring it to be computed through the cmLocalGenerator.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx6
-rw-r--r--Source/cmMakefile.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d4bf6c1..3ac77e9 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1485,10 +1485,8 @@ void cmMakefile::AddLinkDirectory(const std::string& dir)
}
}
-void cmMakefile::InitializeFromParent()
+void cmMakefile::InitializeFromParent(cmMakefile* parent)
{
- cmMakefile *parent = this->LocalGenerator->GetParent()->GetMakefile();
-
// Initialize definitions with the closure of the parent scope.
this->Internal->InitializeDefinitions(parent);
@@ -1672,7 +1670,7 @@ void cmMakefile::Configure()
void cmMakefile::ConfigureSubDirectory(cmMakefile *mf)
{
- mf->InitializeFromParent();
+ mf->InitializeFromParent(this);
std::string currentStart = mf->GetCurrentSourceDirectory();
if (this->GetCMakeInstance()->GetDebugOutput())
{
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 85451ad..def0c23 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -728,7 +728,7 @@ public:
cmPropertyMap &GetProperties() { return this->Properties; }
///! Initialize a makefile from its parent
- void InitializeFromParent();
+ void InitializeFromParent(cmMakefile* parent);
void AddInstallGenerator(cmInstallGenerator* g)
{ if(g) this->InstallGenerators.push_back(g); }