CTest: Port away from cmLocalGenerator.

This commit is contained in:
Stephen Kelly 2015-10-05 20:03:14 +02:00
parent 6da4cd8fb9
commit 3339a7508e
2 changed files with 2 additions and 14 deletions

View File

@ -16,7 +16,6 @@
#include "cmake.h" #include "cmake.h"
#include "cmFunctionBlocker.h" #include "cmFunctionBlocker.h"
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h" #include "cmGlobalGenerator.h"
#include "cmGeneratedFileStream.h" #include "cmGeneratedFileStream.h"
@ -86,7 +85,6 @@ cmCTestScriptHandler::cmCTestScriptHandler()
this->EmptyBinDir = false; this->EmptyBinDir = false;
this->EmptyBinDirOnce = false; this->EmptyBinDirOnce = false;
this->Makefile = 0; this->Makefile = 0;
this->LocalGenerator = 0;
this->CMake = 0; this->CMake = 0;
this->GlobalGenerator = 0; this->GlobalGenerator = 0;
@ -128,9 +126,6 @@ void cmCTestScriptHandler::Initialize()
delete this->Makefile; delete this->Makefile;
this->Makefile = 0; this->Makefile = 0;
delete this->LocalGenerator;
this->LocalGenerator = 0;
delete this->GlobalGenerator; delete this->GlobalGenerator;
this->GlobalGenerator = 0; this->GlobalGenerator = 0;
@ -141,7 +136,6 @@ void cmCTestScriptHandler::Initialize()
cmCTestScriptHandler::~cmCTestScriptHandler() cmCTestScriptHandler::~cmCTestScriptHandler()
{ {
delete this->Makefile; delete this->Makefile;
delete this->LocalGenerator;
delete this->GlobalGenerator; delete this->GlobalGenerator;
delete this->CMake; delete this->CMake;
} }
@ -179,15 +173,14 @@ int cmCTestScriptHandler::ProcessHandler()
void cmCTestScriptHandler::UpdateElapsedTime() void cmCTestScriptHandler::UpdateElapsedTime()
{ {
if (this->LocalGenerator) if (this->Makefile)
{ {
// set the current elapsed time // set the current elapsed time
char timeString[20]; char timeString[20];
int itime = static_cast<unsigned int>(cmSystemTools::GetTime() int itime = static_cast<unsigned int>(cmSystemTools::GetTime()
- this->ScriptStartTime); - this->ScriptStartTime);
sprintf(timeString,"%i",itime); sprintf(timeString,"%i",itime);
this->LocalGenerator->GetMakefile()->AddDefinition("CTEST_ELAPSED_TIME", this->Makefile->AddDefinition("CTEST_ELAPSED_TIME", timeString);
timeString);
} }
} }
@ -316,7 +309,6 @@ void cmCTestScriptHandler::CreateCMake()
{ {
delete this->CMake; delete this->CMake;
delete this->GlobalGenerator; delete this->GlobalGenerator;
delete this->LocalGenerator;
delete this->Makefile; delete this->Makefile;
} }
this->CMake = new cmake; this->CMake = new cmake;
@ -327,8 +319,6 @@ void cmCTestScriptHandler::CreateCMake()
cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot(); cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot();
this->Makefile = new cmMakefile(this->GlobalGenerator, snapshot); this->Makefile = new cmMakefile(this->GlobalGenerator, snapshot);
this->LocalGenerator =
this->GlobalGenerator->CreateLocalGenerator(this->Makefile);
this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest); this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);

View File

@ -18,7 +18,6 @@
#include "cmListFileCache.h" #include "cmListFileCache.h"
class cmMakefile; class cmMakefile;
class cmLocalGenerator;
class cmGlobalGenerator; class cmGlobalGenerator;
class cmake; class cmake;
class cmCTestCommand; class cmCTestCommand;
@ -166,7 +165,6 @@ private:
double ScriptStartTime; double ScriptStartTime;
cmMakefile *Makefile; cmMakefile *Makefile;
cmLocalGenerator *LocalGenerator;
cmGlobalGenerator *GlobalGenerator; cmGlobalGenerator *GlobalGenerator;
cmake *CMake; cmake *CMake;
}; };