Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmEnableTestingCommand.h
blob856dc9a50fe768686ec1c05be95add624e2d2b07
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmEnableTestingCommand.h,v $
5 Language: C++
6 Date: $Date: 2008/01/23 15:27:59 $
7 Version: $Revision: 1.15 $
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 cmEnableTestingCommand_h
18 #define cmEnableTestingCommand_h
20 #include "cmCommand.h"
22 /** \class cmEnableTestingCommand
23 * \brief Enable testing for this directory and below.
25 * Produce the output testfile. This produces a file in the build directory
26 * called CMakeTestfile with a syntax similar to CMakeLists.txt. It contains
27 * the SUBDIRS() and ADD_TEST() commands from the source CMakeLists.txt
28 * file with CMake variables expanded. Only the subdirs and tests
29 * within the valid control structures are replicated in Testfile
30 * (i.e. SUBDIRS() and ADD_TEST() commands within IF() commands that are
31 * not entered by CMake are not replicated in Testfile).
32 * Note that CTest expects to find this file in the build directory root;
33 * therefore, this command should be in the source directory root too.
35 class cmEnableTestingCommand : public cmCommand
37 public:
38 /**
39 * This is a virtual constructor for the command.
41 virtual cmCommand* Clone()
43 return new cmEnableTestingCommand;
46 /**
47 * This is called when the command is first encountered in
48 * the CMakeLists.txt file.
50 virtual bool InitialPass(std::vector<std::string> const&,
51 cmExecutionStatus &);
53 /**
54 * The name of the command as specified in CMakeList.txt.
56 virtual const char* GetName() { return "enable_testing";}
58 /**
59 * Succinct documentation.
61 virtual const char* GetTerseDocumentation()
63 return "Enable testing for current directory and below.";
66 /**
67 * More documentation.
69 virtual const char* GetFullDocumentation()
71 return
72 " enable_testing()\n"
73 "Enables testing for this directory and below. "
74 "See also the add_test command. Note that ctest expects to find "
75 "a test file in the build directory root. Therefore, this command "
76 "should be in the source directory root.";
79 cmTypeMacro(cmEnableTestingCommand, cmCommand);
84 #endif