summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestScriptHandler.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-02-17 15:51:52 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-02-17 15:51:52 (GMT)
commit8fe168651033cb1374b36424ed2458db5d56ab27 (patch)
treed39ea4af235887acd1f907cb2d1a2948273e6307 /Source/CTest/cmCTestScriptHandler.cxx
parentad5115d00f4753970187739c20360d922b36e7b1 (diff)
downloadCMake-8fe168651033cb1374b36424ed2458db5d56ab27.zip
CMake-8fe168651033cb1374b36424ed2458db5d56ab27.tar.gz
CMake-8fe168651033cb1374b36424ed2458db5d56ab27.tar.bz2
ENH: Cleanups and add CTEST_START command
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.cxx')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index d1e89df..ba396ba 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -45,6 +45,7 @@
#include "cmCTestEmptyBinaryDirectoryCommand.h"
#include "cmCTestRunScriptCommand.h"
#include "cmCTestSleepCommand.h"
+#include "cmCTestStartCommand.h"
#define CTEST_INITIAL_CMAKE_OUTPUT_FILE_NAME "CTestInitialCMakeOutput.log"
@@ -158,6 +159,15 @@ void cmCTestScriptHandler::UpdateElapsedTime()
}
//----------------------------------------------------------------------
+void cmCTestScriptHandler::AddCTestCommand(cmCTestCommand* command)
+{
+ cmCTestCommand* newCom = command;
+ newCom->m_CTest = m_CTest;
+ newCom->m_CTestScriptHandler = this;
+ m_CMake->AddCommand(newCom);
+}
+
+//----------------------------------------------------------------------
// this sets up some variables for thew script to use, creates the required
// cmake instance and generators, and then reads in the script
int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
@@ -209,18 +219,10 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
// add any ctest specific commands, probably should have common superclass
// for ctest commands to clean this up. If a couple more commands are
// created with the same format lets do that - ken
- cmCTestCommand* newCom = new cmCTestRunScriptCommand;
- newCom->m_CTest = m_CTest;
- newCom->m_CTestScriptHandler = this;
- m_CMake->AddCommand(newCom);
- newCom = new cmCTestEmptyBinaryDirectoryCommand;
- newCom->m_CTest = m_CTest;
- newCom->m_CTestScriptHandler = this;
- m_CMake->AddCommand(newCom);
- newCom = new cmCTestSleepCommand;
- newCom->m_CTest = m_CTest;
- newCom->m_CTestScriptHandler = this;
- m_CMake->AddCommand(newCom);
+ this->AddCTestCommand(new cmCTestRunScriptCommand);
+ this->AddCTestCommand(new cmCTestEmptyBinaryDirectoryCommand);
+ this->AddCTestCommand(new cmCTestSleepCommand);
+ this->AddCTestCommand(new cmCTestStartCommand);
// add the script arg if defined
if (script_arg.size())