diff options
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestLaunch.cxx | 4 | ||||
-rw-r--r-- | Source/CTest/cmCTestScriptHandler.cxx | 10 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index 7340d5c..fb0cce6 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -738,9 +738,9 @@ void cmCTestLaunch::LoadConfig() cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); cmGlobalGenerator gg(&cm); + cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot())); cmsys::auto_ptr<cmLocalGenerator> lg( - gg.CreateLocalGenerator(cm.GetCurrentSnapshot())); - cmMakefile* mf = lg->GetMakefile(); + gg.CreateLocalGenerator(mf.get())); std::string fname = this->LogDir; fname += "CTestLaunchConfig.cmake"; if(cmSystemTools::FileExists(fname.c_str()) && diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 4be5eb6..c1ba279 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -125,6 +125,7 @@ void cmCTestScriptHandler::Initialize() // what time in seconds did this script start running this->ScriptStartTime = 0; + delete this->Makefile; this->Makefile = 0; delete this->LocalGenerator; @@ -139,8 +140,7 @@ void cmCTestScriptHandler::Initialize() //---------------------------------------------------------------------- cmCTestScriptHandler::~cmCTestScriptHandler() { - // local generator owns the makefile - this->Makefile = 0; + delete this->Makefile; delete this->LocalGenerator; delete this->GlobalGenerator; delete this->CMake; @@ -317,6 +317,7 @@ void cmCTestScriptHandler::CreateCMake() delete this->CMake; delete this->GlobalGenerator; delete this->LocalGenerator; + delete this->Makefile; } this->CMake = new cmake; this->CMake->SetHomeDirectory(""); @@ -325,8 +326,9 @@ void cmCTestScriptHandler::CreateCMake() this->GlobalGenerator = new cmGlobalGenerator(this->CMake); cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot(); - this->LocalGenerator = this->GlobalGenerator->CreateLocalGenerator(snapshot); - this->Makefile = this->LocalGenerator->GetMakefile(); + this->Makefile = new cmMakefile(this->GlobalGenerator, snapshot); + this->LocalGenerator = + this->GlobalGenerator->CreateLocalGenerator(this->Makefile); this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest); diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 9e00193..a523f57 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1592,9 +1592,9 @@ void cmCTestTestHandler::GetListOfTests() cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); cmGlobalGenerator gg(&cm); + cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot())); cmsys::auto_ptr<cmLocalGenerator> lg( - gg.CreateLocalGenerator(cm.GetCurrentSnapshot())); - cmMakefile *mf = lg->GetMakefile(); + gg.CreateLocalGenerator(mf.get())); mf->AddDefinition("CTEST_CONFIGURATION_TYPE", this->CTest->GetConfigType().c_str()); |