[Cmake-commits] [cmake-commits] king committed cmCTestScriptHandler.cxx 1.51 1.52 cmCTestTestHandler.cxx 1.99 1.100

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Jul 28 10:46:55 EDT 2009


Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv19391/Source/CTest

Modified Files:
	cmCTestScriptHandler.cxx cmCTestTestHandler.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: cmCTestTestHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestTestHandler.cxx,v
retrieving revision 1.99
retrieving revision 1.100
diff -C 2 -d -r1.99 -r1.100
*** cmCTestTestHandler.cxx	27 Jul 2009 18:17:38 -0000	1.99
--- cmCTestTestHandler.cxx	28 Jul 2009 14:46:50 -0000	1.100
***************
*** 1971,1975 ****
    gg.SetCMakeInstance(&cm);
    std::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
-   lg->SetGlobalGenerator(&gg);
    cmMakefile *mf = lg->GetMakefile();
    mf->AddDefinition("CTEST_CONFIGURATION_TYPE",
--- 1971,1974 ----

Index: cmCTestScriptHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestScriptHandler.cxx,v
retrieving revision 1.51
retrieving revision 1.52
diff -C 2 -d -r1.51 -r1.52
*** cmCTestScriptHandler.cxx	12 Jul 2009 08:51:50 -0000	1.51
--- cmCTestScriptHandler.cxx	28 Jul 2009 14:46:46 -0000	1.52
***************
*** 336,340 ****
  
    this->LocalGenerator = this->GlobalGenerator->CreateLocalGenerator();
-   this->LocalGenerator->SetGlobalGenerator(this->GlobalGenerator);
    this->Makefile = this->LocalGenerator->GetMakefile();
  
--- 336,339 ----



More information about the Cmake-commits mailing list