FIX: stupid pb fixed (close to being medieval'ed by The Ken)
[cmake.git] / Source / cmEnableTestingCommand.h
blob18673baa476078923797bfb526be7bdb4c3b6f33
1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmEnableTestingCommand.h,v $
5 Language: C++
6 Date: $Date: 2002-06-18 21:20:27 $
7 Version: $Revision: 1.5 $
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 cmEnableTestingCommand_h
18 #define cmEnableTestingCommand_h
20 #include "cmStandardIncludes.h"
21 #include "cmCommand.h"
23 /** \class cmEnableTestingCommand
24 * \brief Enable testing for this directory and below.
26 * Produce the output testfile. This produces a file in the build directory
27 * called CMakeTestfile with a syntax similar to CMakeLists.txt. It contains
28 * the SUBDIRS() and ADD_TEST() commands from the source CMakeLists.txt
29 * file with CMake variables expanded. Only the subdirs and tests
30 * within the valid control structures are replicated in Testfile
31 * (i.e. SUBDIRS() and ADD_TEST() commands within IF() commands that are
32 * not entered by CMake are not replicated in Testfile).
33 * Note that Dart expects to find this file in the build directory root;
34 * therefore, this command should be in the source directory root too.
36 class cmEnableTestingCommand : public cmCommand
38 public:
39 /**
40 * This is a virtual constructor for the command.
42 virtual cmCommand* Clone()
44 return new cmEnableTestingCommand;
47 /**
48 * This determines if the command gets propagated down
49 * to makefiles located in subdirectories.
51 virtual bool IsInherited() {return true;}
53 /**
54 * This is called when the command is first encountered in
55 * the CMakeLists.txt file.
57 virtual bool InitialPass(std::vector<std::string> const&) {return true;}
59 /**
60 * This is called at the end after all the information
61 * specified by the command is accumulated. Most commands do
62 * not implement this method. At this point, reading and
63 * writing to the cache can be done.
65 virtual void FinalPass();
67 /**
68 * The name of the command as specified in CMakeList.txt.
70 virtual const char* GetName() { return "ENABLE_TESTING";}
72 /**
73 * Succinct documentation.
75 virtual const char* GetTerseDocumentation()
77 return "Enable testing for this directory and below.";
80 /**
81 * More documentation.
83 virtual const char* GetFullDocumentation()
85 return
86 "ENABLE_TESTING()\n"
87 "Enables testing for this directory and below. See also the ADD_TEST command. Note that Dart expects to find this file in the build directory root; therefore, this command should be in the source directory root too.";
90 cmTypeMacro(cmEnableTestingCommand, cmCommand);
94 #endif