diff options
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ebc38d8..f069481 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -430,7 +430,8 @@ void cmake::ReadListFile(const std::vector<std::string>& args, this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory()); this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory()); cmState::Snapshot snapshot = this->GetCurrentSnapshot(); - cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(snapshot)); + cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot)); + cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(mf.get())); lg->GetMakefile()->SetCurrentBinaryDirectory (cmSystemTools::GetCurrentWorkingDirectory()); lg->GetMakefile()->SetCurrentSourceDirectory @@ -472,8 +473,8 @@ bool cmake::FindPackage(const std::vector<std::string>& args) cmState::Snapshot snapshot = this->GetCurrentSnapshot(); // read in the list file to fill the cache - cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(snapshot)); - cmMakefile* mf = lg->GetMakefile(); + cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot)); + cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(mf.get())); mf->SetCurrentBinaryDirectory (cmSystemTools::GetCurrentWorkingDirectory()); mf->SetCurrentSourceDirectory @@ -2061,9 +2062,8 @@ int cmake::CheckBuildSystem() cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); cmGlobalGenerator gg(&cm); - cmsys::auto_ptr<cmLocalGenerator> lg( - gg.CreateLocalGenerator(cm.GetCurrentSnapshot())); - cmMakefile* mf = lg->GetMakefile(); + cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot())); + cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator(mf.get())); if(!mf->ReadListFile(this->CheckBuildSystemArgument.c_str()) || cmSystemTools::GetErrorOccuredFlag()) { @@ -2092,9 +2092,11 @@ int cmake::CheckBuildSystem() ggd(this->CreateGlobalGenerator(genName)); if(ggd.get()) { + cmsys::auto_ptr<cmMakefile> mfd(new cmMakefile(ggd.get(), + cm.GetCurrentSnapshot())); cmsys::auto_ptr<cmLocalGenerator> lgd( - ggd->CreateLocalGenerator(cm.GetCurrentSnapshot())); - lgd->ClearDependencies(mf, verbose); + ggd->CreateLocalGenerator(mfd.get())); + lgd->ClearDependencies(mfd.get(), verbose); } } |