summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestStartCommand.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-04-28 15:59:31 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-04-28 15:59:31 (GMT)
commit2d81046ae20d1638927e89f5e0b78daca1e102f3 (patch)
treead74b7db193b4a5639183b6b0a4dbb6f931ddc1e /Source/CTest/cmCTestStartCommand.cxx
parent185c282bd33e426751277c10078a14e9bcc08b85 (diff)
downloadCMake-2d81046ae20d1638927e89f5e0b78daca1e102f3.zip
CMake-2d81046ae20d1638927e89f5e0b78daca1e102f3.tar.gz
CMake-2d81046ae20d1638927e89f5e0b78daca1e102f3.tar.bz2
ENH: Add support for special tracks, fix options of handlers so that the -R, -U, and so on work in the new style scripting
Diffstat (limited to 'Source/CTest/cmCTestStartCommand.cxx')
-rw-r--r--Source/CTest/cmCTestStartCommand.cxx32
1 files changed, 24 insertions, 8 deletions
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index 515cf75..aa77c75 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -29,22 +29,32 @@ bool cmCTestStartCommand::InitialPass(
return false;
}
- const char* smodel = args[0].c_str();
+ size_t cnt = 0;
+ const char* smodel = args[cnt].c_str();
const char* src_dir = 0;
const char* bld_dir = 0;
- if ( args.size() >= 2 )
+ cnt++;
+
+ this->CTest->SetSpecificTrack(0);
+ if ( cnt < args.size() -1 )
{
- src_dir = args[1].c_str();
- if ( args.size() == 3 )
+ if ( args[cnt] == "TRACK" )
{
- bld_dir = args[2].c_str();
+ cnt ++;
+ this->CTest->SetSpecificTrack(args[cnt].c_str());
+ cnt ++;
}
}
- if ( args.size() > 3 )
+
+ if ( cnt < args.size() )
{
- this->SetError("called with incorrect number of arguments");
- return false;
+ src_dir = args[cnt].c_str();
+ cnt ++;
+ if ( cnt < args.size() )
+ {
+ bld_dir = args[cnt].c_str();
+ }
}
if ( !src_dir )
{
@@ -74,6 +84,12 @@ bool cmCTestStartCommand::InitialPass(
<< smodel << std::endl
<< " Source directory: " << src_dir << std::endl
<< " Build directory: " << bld_dir << std::endl);
+ const char* track = this->CTest->GetSpecificTrack();
+ if ( track )
+ {
+ cmCTestLog(this->CTest, HANDLER_OUTPUT,
+ " Track: " << track << std::endl);
+ }
this->Makefile->AddDefinition("CTEST_RUN_CURRENT_SCRIPT", "OFF");
this->CTest->SetSuppressUpdatingCTestConfiguration(true);