1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmAddTestCommand.h,v $
6 Date: $Date: 2002-01-21 20:30:18 $
7 Version: $Revision: 1.6 $
9 Copyright (c) 2002 Insight Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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 cmAddTestCommand_h
18 #define cmAddTestCommand_h
20 #include "cmStandardIncludes.h"
21 #include "cmCommand.h"
23 /** \class cmAddTestCommand
24 * \brief Add a test to the lists of tests to run.
26 * cmAddTestCommand adds a test to the list of tests to run .
28 class cmAddTestCommand
: public cmCommand
32 * This is a virtual constructor for the command.
34 virtual cmCommand
* Clone()
36 return new cmAddTestCommand
;
40 * This is called when the command is first encountered in
41 * the CMakeLists.txt file.
43 virtual bool InitialPass(std::vector
<std::string
> const& args
);
46 * This is called at the end after all the information
47 * specified by the command is accumulated.
49 virtual void FinalPass();
52 * The name of the command as specified in CMakeList.txt.
54 virtual const char* GetName() { return "ADD_TEST";}
57 * Succinct documentation.
59 virtual const char* GetTerseDocumentation()
61 return "Add a test to the project with the specified arguments.";
67 virtual const char* GetFullDocumentation()
70 "ADD_TEST(testname exename arg1 arg2 arg3 ...)\n"
71 "If the ENABLE_TESTING command has been run, this command adds a"
72 "test target to the current directory. If ENABLE_TESTING has not"
73 "been run, this command does nothing.\n"
74 "The tests are run by the testing subsystem by executing exename "
75 "with the specified arguments. exename can be either an executable "
76 "built by built by this project or an arbitrary executable on the "
77 "system (like tclsh).";
80 cmTypeMacro(cmAddTestCommand
, cmCommand
);
83 std::vector
<std::string
> m_Args
;