[Cmake-commits] [cmake-commits] king committed cmCTest.cxx 1.361 1.362 cmake.cxx 1.417 1.418
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Jul 28 10:47:06 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv19391/Source
Modified Files:
cmCTest.cxx cmake.cxx
Log Message:
BUG: Do not double-initialize local generators
All global generator CreateLocalGenerator methods automatically
initialize the local generator instances with SetGlobalGenerator. In
several places we were calling SetGlobalGenerator again after receiving
the return value from CreateLocalGenerator. The double-initializations
leaked the resources allocated by the first call to SetGlobalGenerator.
This fix removes the unnecessary calls.
Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.361
retrieving revision 1.362
diff -C 2 -d -r1.361 -r1.362
*** cmCTest.cxx 22 Jul 2009 16:06:52 -0000 1.361
--- cmCTest.cxx 28 Jul 2009 14:46:53 -0000 1.362
***************
*** 351,355 ****
gg.SetCMakeInstance(&cm);
std::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
- lg->SetGlobalGenerator(&gg);
cmMakefile *mf = lg->GetMakefile();
if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(), mf) )
--- 351,354 ----
Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.417
retrieving revision 1.418
diff -C 2 -d -r1.417 -r1.418
*** cmake.cxx 25 Jun 2009 20:41:56 -0000 1.417
--- cmake.cxx 28 Jul 2009 14:47:02 -0000 1.418
***************
*** 501,505 ****
{
std::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
- lg->SetGlobalGenerator(gg);
lg->GetMakefile()->SetHomeOutputDirectory
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
--- 501,504 ----
***************
*** 1533,1537 ****
cm.SetGlobalGenerator(ggd);
std::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator());
- lgd->SetGlobalGenerator(ggd);
lgd->GetMakefile()->SetStartDirectory(startDir.c_str());
lgd->GetMakefile()->SetStartOutputDirectory(startOutDir.c_str());
--- 1532,1535 ----
***************
*** 2626,2630 ****
gg.SetCMakeInstance(&cm);
std::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
- lg->SetGlobalGenerator(&gg);
cmMakefile* mf = lg->GetMakefile();
if(!mf->ReadListFile(0, this->CheckBuildSystemArgument.c_str()) ||
--- 2624,2627 ----
***************
*** 2657,2661 ****
{
std::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator());
- lgd->SetGlobalGenerator(ggd.get());
lgd->ClearDependencies(mf, verbose);
}
--- 2654,2657 ----
***************
*** 2896,2900 ****
ggi.SetCMakeInstance(&cm);
std::auto_ptr<cmLocalGenerator> lg(ggi.CreateLocalGenerator());
- lg->SetGlobalGenerator(&ggi);
cmMakefile *mf = lg->GetMakefile();
--- 2892,2895 ----
More information about the Cmake-commits
mailing list