1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCTestRunScriptCommand.h,v $
6 Date: $Date: 2008-05-12 13:11:51 $
7 Version: $Revision: 1.5 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmCTestRunScriptCommand_h
18 #define cmCTestRunScriptCommand_h
20 #include "cmCTestCommand.h"
22 /** \class cmCTestRunScript
23 * \brief Run a ctest script
25 * cmLibrarysCommand defines a list of executable (i.e., test)
28 class cmCTestRunScriptCommand
: public cmCTestCommand
32 cmCTestRunScriptCommand() {}
35 * This is a virtual constructor for the command.
37 virtual cmCommand
* Clone()
39 cmCTestRunScriptCommand
* ni
= new cmCTestRunScriptCommand
;
40 ni
->CTest
= this->CTest
;
41 ni
->CTestScriptHandler
= this->CTestScriptHandler
;
46 * This is called when the command is first encountered in
47 * the CMakeLists.txt file.
49 virtual bool InitialPass(std::vector
<std::string
> const& args
,
50 cmExecutionStatus
&status
);
53 * The name of the command as specified in CMakeList.txt.
55 virtual const char* GetName() { return "ctest_run_script";}
58 * Succinct documentation.
60 virtual const char* GetTerseDocumentation()
62 return "runs a ctest -S script";
68 virtual const char* GetFullDocumentation()
71 " ctest_run_script([NEW_PROCESS] script_file_name script_file_name1 \n"
72 " script_file_name2 ...)\n"
73 "Runs a script or scripts much like if it was run from ctest -S. "
74 "If no argument is provided then the current script is run using "
75 "the current settings of the variables. If NEW_PROCESS is specified "
76 "then each script will be run in a seperate process.";
79 cmTypeMacro(cmCTestRunScriptCommand
, cmCTestCommand
);