summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestScriptHandler.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-10-01 16:21:16 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-10-01 16:21:16 (GMT)
commit6e9ec4598d0505b179012ba5d6d77b1b161a334a (patch)
treebdd6a8f7fbf8b9269f8460fc9162332c110ba42a /Source/CTest/cmCTestScriptHandler.cxx
parent7350756728923cc245464703ac3d4a0cef9653bd (diff)
downloadCMake-6e9ec4598d0505b179012ba5d6d77b1b161a334a.zip
CMake-6e9ec4598d0505b179012ba5d6d77b1b161a334a.tar.gz
CMake-6e9ec4598d0505b179012ba5d6d77b1b161a334a.tar.bz2
ENH: Add CTEST_EXECUTABLE_NAME to CTest scripting. This way you do not have to specify ctest executable in CTEST_COMMAND, but just a variable
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.cxx')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 9c2ac29..7f0c2eb 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -95,7 +95,7 @@ void cmCTestScriptHandler::AddConfigurationScript(const char *script)
//----------------------------------------------------------------------
// the generic entry point for handling scripts, this routine will run all
// the scripts provides a -S arguments
-int cmCTestScriptHandler::RunConfigurationScript()
+int cmCTestScriptHandler::RunConfigurationScript(cmCTest* ctest)
{
int res = 0;
std::vector<cmStdString>::iterator it;
@@ -104,7 +104,7 @@ int cmCTestScriptHandler::RunConfigurationScript()
it ++ )
{
// for each script run it
- res += this->RunConfigurationScript(
+ res += this->RunConfigurationScript(ctest,
cmSystemTools::CollapseFullPath(it->c_str()));
}
return res;
@@ -114,7 +114,7 @@ int cmCTestScriptHandler::RunConfigurationScript()
//----------------------------------------------------------------------
// 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)
+int cmCTestScriptHandler::ReadInScript(cmCTest* ctest, const std::string& total_script_arg)
{
// if the argument has a , in it then it needs to be broken into the fist
// argument (which is the script) and the second argument which will be
@@ -156,6 +156,8 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
m_LocalGenerator->GetMakefile()->AddDefinition("CTEST_SCRIPT_NAME",
cmSystemTools::GetFilenameName(
script).c_str());
+ m_LocalGenerator->GetMakefile()->AddDefinition("CTEST_EXECUTABLE_NAME",
+ ctest->GetCTestExecutable());
// add the script arg if defined
if (script_arg.size())
{
@@ -277,13 +279,13 @@ void cmCTestScriptHandler::LocalSleep(unsigned int secondsToWait)
//----------------------------------------------------------------------
// run a specific script
-int cmCTestScriptHandler::RunConfigurationScript(
+int cmCTestScriptHandler::RunConfigurationScript(cmCTest* ctest,
const std::string& total_script_arg)
{
int result;
// read in the script
- result = this->ReadInScript(total_script_arg);
+ result = this->ReadInScript(ctest, total_script_arg);
if (result)
{
return result;