summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-28 14:47:02 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-28 14:47:02 (GMT)
commite9d7ebb3ec751528a422108b20dc3c24fcd39530 (patch)
tree07660eabb01ffed7532d15fb915e608d8c6bb3a7 /Source/CTest
parent57057ee59550980e19d5c4535d3ec0f4734653a0 (diff)
downloadCMake-e9d7ebb3ec751528a422108b20dc3c24fcd39530.zip
CMake-e9d7ebb3ec751528a422108b20dc3c24fcd39530.tar.gz
CMake-e9d7ebb3ec751528a422108b20dc3c24fcd39530.tar.bz2
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.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx1
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx1
2 files changed, 0 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 12e7005..4ba9e68 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -335,7 +335,6 @@ void cmCTestScriptHandler::CreateCMake()
this->GlobalGenerator->SetCMakeInstance(this->CMake);
this->LocalGenerator = this->GlobalGenerator->CreateLocalGenerator();
- this->LocalGenerator->SetGlobalGenerator(this->GlobalGenerator);
this->Makefile = this->LocalGenerator->GetMakefile();
// remove all cmake commands which are not scriptable, since they can't be
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index da3fd5e..1e41371 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1970,7 +1970,6 @@ void cmCTestTestHandler::GetListOfTests()
cmGlobalGenerator gg;
gg.SetCMakeInstance(&cm);
std::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
- lg->SetGlobalGenerator(&gg);
cmMakefile *mf = lg->GetMakefile();
mf->AddDefinition("CTEST_CONFIGURATION_TYPE",
this->CTest->GetConfigType().c_str());