diff options
author | Brad King <brad.king@kitware.com> | 2009-03-16 14:40:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-03-16 14:40:46 (GMT) |
commit | 66d69f864ae880f556debf02e66dee4855b0f2df (patch) | |
tree | 562a710c7c071a8dbfd83a15abd35e3a62ec4681 /Source/cmMakefile.cxx | |
parent | e67f5138b80b3b04844f3f5c0a3c69796266f9e6 (diff) | |
download | CMake-66d69f864ae880f556debf02e66dee4855b0f2df.zip CMake-66d69f864ae880f556debf02e66dee4855b0f2df.tar.gz CMake-66d69f864ae880f556debf02e66dee4855b0f2df.tar.bz2 |
ENH: Refactor generation of CTestTestfile content
This moves code which generates ADD_TEST and SET_TESTS_PROPERTIES calls
into CTestTestfile.cmake files out of cmLocalGenerator and into a
cmTestGenerator class. This will allow more advanced generation without
cluttering cmLocalGenerator. The cmTestGenerator class derives from
cmScriptGenerator to get support for per-configuration script
generation (not yet enabled).
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d22cebd..69d58ba 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -32,6 +32,7 @@ # include "cmVariableWatch.h" #endif #include "cmInstallGenerator.h" +#include "cmTestGenerator.h" #include "cmake.h" #include <stdlib.h> // required for atoi @@ -108,7 +109,6 @@ cmMakefile::cmMakefile(const cmMakefile& mf) this->Targets = mf.Targets; this->SourceFiles = mf.SourceFiles; this->Tests = mf.Tests; - this->OrderedTests = mf.OrderedTests; this->IncludeDirectories = mf.IncludeDirectories; this->LinkDirectories = mf.LinkDirectories; this->SystemIncludeDirectories = mf.SystemIncludeDirectories; @@ -116,6 +116,7 @@ cmMakefile::cmMakefile(const cmMakefile& mf) this->OutputFiles = mf.OutputFiles; this->LinkLibraries = mf.LinkLibraries; this->InstallGenerators = mf.InstallGenerators; + this->TestGenerators = mf.TestGenerators; this->IncludeFileRegularExpression = mf.IncludeFileRegularExpression; this->ComplainFileRegularExpression = mf.ComplainFileRegularExpression; this->SourceFileExtensions = mf.SourceFileExtensions; @@ -181,6 +182,12 @@ cmMakefile::~cmMakefile() { delete *i; } + for(std::vector<cmTestGenerator*>::iterator + i = this->TestGenerators.begin(); + i != this->TestGenerators.end(); ++i) + { + delete *i; + } for(std::vector<cmSourceFile*>::iterator i = this->SourceFiles.begin(); i != this->SourceFiles.end(); ++i) { @@ -3324,7 +3331,6 @@ cmTest* cmMakefile::CreateTest(const char* testName) test->SetName(testName); test->SetMakefile(this); this->Tests[testName] = test; - this->OrderedTests.push_back(test); return test; } @@ -3343,12 +3349,6 @@ cmTest* cmMakefile::GetTest(const char* testName) const return 0; } -//---------------------------------------------------------------------------- -const std::vector<cmTest*> *cmMakefile::GetTests() const -{ - return &this->OrderedTests; -} - std::string cmMakefile::GetListFileStack() { cmOStringStream tmp; |