TZIVI-254: IVI needs a newer version of cmake
[profile/ivi/cmake.git] / Source / CTest / cmCTestConfigureCommand.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #ifndef cmCTestConfigureCommand_h
13 #define cmCTestConfigureCommand_h
14
15 #include "cmCTestHandlerCommand.h"
16
17 /** \class cmCTestConfigure
18  * \brief Run a ctest script
19  *
20  * cmCTestConfigureCommand defineds the command to configures the project.
21  */
22 class cmCTestConfigureCommand : public cmCTestHandlerCommand
23 {
24 public:
25   cmCTestConfigureCommand();
26
27   /**
28    * This is a virtual constructor for the command.
29    */
30   virtual cmCommand* Clone()
31     {
32     cmCTestConfigureCommand* ni = new cmCTestConfigureCommand;
33     ni->CTest = this->CTest;
34     ni->CTestScriptHandler = this->CTestScriptHandler;
35     return ni;
36     }
37
38   /**
39    * The name of the command as specified in CMakeList.txt.
40    */
41   virtual const char* GetName() const { return "ctest_configure";}
42
43   /**
44    * Succinct documentation.
45    */
46   virtual const char* GetTerseDocumentation() const
47     {
48     return "Configure the project build tree.";
49     }
50
51   /**
52    * More documentation.
53    */
54   virtual const char* GetFullDocumentation() const
55     {
56     return
57       "  ctest_configure([BUILD build_dir] [SOURCE source_dir] [APPEND]\n"
58       "                  [OPTIONS options] [RETURN_VALUE res])\n"
59       "Configures the given build directory and stores results in "
60       "Configure.xml. "
61       "If no BUILD is given, the CTEST_BINARY_DIRECTORY variable is used. "
62       "If no SOURCE is given, the CTEST_SOURCE_DIRECTORY variable is used. "
63       "The OPTIONS argument specifies command line arguments to pass to "
64       "the configuration tool. "
65       "The RETURN_VALUE option specifies a variable in which to store the "
66       "return value of the native build tool."
67       "\n"
68       CTEST_COMMAND_APPEND_OPTION_DOCS;
69     }
70
71   cmTypeMacro(cmCTestConfigureCommand, cmCTestHandlerCommand);
72
73 protected:
74   cmCTestGenericHandler* InitializeHandler();
75
76   enum {
77     ctc_FIRST = ct_LAST,
78     ctc_OPTIONS,
79     ctc_LAST
80   };
81 };
82
83
84 #endif