From 7657e8b1df64ed3b5429be34416e8756b659d525 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 3 Jun 2015 00:57:31 +0200 Subject: [PATCH] cmMakefile: Introduce a local cmMakefile variable. --- Source/cmMakefile.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ae9fe326b..7e103bc98 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1685,21 +1685,23 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath, ->MakeLocalGenerator(newSnapshot, this->LocalGenerator); this->GetGlobalGenerator()->AddLocalGenerator(lg2); + cmMakefile* subMf = lg2->GetMakefile(); + // set the subdirs start dirs - lg2->GetMakefile()->SetCurrentSourceDirectory(srcPath); - lg2->GetMakefile()->SetCurrentBinaryDirectory(binPath); + subMf->SetCurrentSourceDirectory(srcPath); + subMf->SetCurrentBinaryDirectory(binPath); if(excludeFromAll) { - lg2->GetMakefile()->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); + subMf->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } if (immediate) { - this->ConfigureSubDirectory(lg2->GetMakefile()); + this->ConfigureSubDirectory(subMf); } else { - this->UnConfiguredDirectories.push_back(lg2->GetMakefile()); + this->UnConfiguredDirectories.push_back(subMf); } }