summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestScriptHandler.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-02 09:41:51 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-28 16:44:39 (GMT)
commitff8ac8ee6ab3ee686621445456a765fa33c1a873 (patch)
tree35e36e25e7211e74f550fd9416f37a33b34074ca /Source/CTest/cmCTestScriptHandler.cxx
parent0bd7279fd9608702b7790822c80f3c284de8e7e4 (diff)
downloadCMake-ff8ac8ee6ab3ee686621445456a765fa33c1a873.zip
CMake-ff8ac8ee6ab3ee686621445456a765fa33c1a873.tar.gz
CMake-ff8ac8ee6ab3ee686621445456a765fa33c1a873.tar.bz2
cmLocalGenerator: Create from already-constructed cmMakefile.
Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.cxx')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx10
1 files changed, 6 insertions, 4 deletions
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);