diff options
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index dbbe07d..386f6a5 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -135,7 +135,6 @@ cmake::cmake() this->ClearBuildSystem = false; this->FileComparison = new cmFileTimeComparison; - this->Policies = new cmPolicies(); this->State = new cmState(this); this->CurrentSnapshot = this->State->CreateBaseSnapshot(); @@ -173,7 +172,6 @@ cmake::cmake() cmake::~cmake() { delete this->CacheManager; - delete this->Policies; delete this->State; if (this->GlobalGenerator) { @@ -378,7 +376,9 @@ void cmake::ReadListFile(const std::vector<std::string>& args, std::string homeOutputDir = this->GetHomeOutputDirectory(); this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory()); this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory()); - cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator()); + cmState::Snapshot snapshot = this->GetCurrentSnapshot(); + 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 @@ -418,9 +418,10 @@ bool cmake::FindPackage(const std::vector<std::string>& args) cmGlobalGenerator *gg = new cmGlobalGenerator(this); this->SetGlobalGenerator(gg); + cmState::Snapshot snapshot = this->GetCurrentSnapshot(); // read in the list file to fill the cache - cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator()); - 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 @@ -1904,8 +1905,8 @@ int cmake::CheckBuildSystem() cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); cmGlobalGenerator gg(&cm); - cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator()); - 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()) { @@ -1934,8 +1935,11 @@ int cmake::CheckBuildSystem() ggd(this->CreateGlobalGenerator(genName)); if(ggd.get()) { - cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->MakeLocalGenerator()); - lgd->ClearDependencies(mf, verbose); + cmsys::auto_ptr<cmMakefile> mfd(new cmMakefile(ggd.get(), + cm.GetCurrentSnapshot())); + cmsys::auto_ptr<cmLocalGenerator> lgd( + ggd->CreateLocalGenerator(mfd.get())); + lgd->ClearDependencies(mfd.get(), verbose); } } |