From 0a73044579a687d1f610a3b6d65e801d2f217435 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 5 Oct 2015 20:52:26 +0200 Subject: [PATCH] cmake: Remove needless cmLocalGenerator creation. --- Source/cmake.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 386f6a5a5..2aa092a96 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -378,20 +378,19 @@ void cmake::ReadListFile(const std::vector& args, this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory()); cmState::Snapshot snapshot = this->GetCurrentSnapshot(); cmsys::auto_ptr mf(new cmMakefile(gg, snapshot)); - cmsys::auto_ptr lg(gg->CreateLocalGenerator(mf.get())); - lg->GetMakefile()->SetCurrentBinaryDirectory + mf->SetCurrentBinaryDirectory (cmSystemTools::GetCurrentWorkingDirectory()); - lg->GetMakefile()->SetCurrentSourceDirectory + mf->SetCurrentSourceDirectory (cmSystemTools::GetCurrentWorkingDirectory()); if (this->GetWorkingMode() != NORMAL_MODE) { std::string file(cmSystemTools::CollapseFullPath(path)); cmSystemTools::ConvertToUnixSlashes(file); - lg->GetMakefile()->SetScriptModeFile(file.c_str()); + mf->SetScriptModeFile(file.c_str()); - lg->GetMakefile()->SetArgcArgv(args); + mf->SetArgcArgv(args); } - if (!lg->GetMakefile()->ReadListFile(path)) + if (!mf->ReadListFile(path)) { cmSystemTools::Error("Error processing file: ", path); } @@ -1906,7 +1905,6 @@ int cmake::CheckBuildSystem() cm.SetHomeOutputDirectory(""); cmGlobalGenerator gg(&cm); cmsys::auto_ptr mf(new cmMakefile(&gg, cm.GetCurrentSnapshot())); - cmsys::auto_ptr lg(gg.CreateLocalGenerator(mf.get())); if(!mf->ReadListFile(this->CheckBuildSystemArgument.c_str()) || cmSystemTools::GetErrorOccuredFlag()) {