1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmAddTestCommand.h,v $
6 Date: $Date: 2008-01-23 15:27:59 $
7 Version: $Revision: 1.16 $
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 cmAddTestCommand_h
18 #define cmAddTestCommand_h
20 #include "cmCommand.h"
22 /** \class cmAddTestCommand
23 * \brief Add a test to the lists of tests to run.
25 * cmAddTestCommand adds a test to the list of tests to run .
27 class cmAddTestCommand
: public cmCommand
31 * This is a virtual constructor for the command.
33 virtual cmCommand
* Clone()
35 return new cmAddTestCommand
;
39 * This is called when the command is first encountered in
40 * the CMakeLists.txt file.
42 virtual bool InitialPass(std::vector
<std::string
> const& args
,
43 cmExecutionStatus
&status
);
46 * The name of the command as specified in CMakeList.txt.
48 virtual const char* GetName() { return "add_test";}
51 * Succinct documentation.
53 virtual const char* GetTerseDocumentation()
55 return "Add a test to the project with the specified arguments.";
61 virtual const char* GetFullDocumentation()
64 " add_test(testname Exename arg1 arg2 ...)\n"
65 "If the ENABLE_TESTING command has been run, this command adds a "
66 "test target to the current directory. If ENABLE_TESTING has not "
67 "been run, this command does nothing. "
68 "The tests are run by the testing subsystem by executing Exename "
69 "with the specified arguments. Exename can be either an executable "
70 "built by this project or an arbitrary executable on the "
71 "system (like tclsh). The test will be run with the current working "
72 "directory set to the CMakeList.txt files corresponding directory "
73 "in the binary tree.";
76 cmTypeMacro(cmAddTestCommand
, cmCommand
);