1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCTestBuildCommand.h,v $
6 Date: $Date: 2009-02-20 20:51:02 $
7 Version: $Revision: 1.9 $
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 cmCTestBuildCommand_h
18 #define cmCTestBuildCommand_h
20 #include "cmCTestHandlerCommand.h"
22 class cmGlobalGenerator
;
23 class cmCTestBuildHandler
;
25 /** \class cmCTestBuild
26 * \brief Run a ctest script
28 * cmCTestBuildCommand defineds the command to build the project.
30 class cmCTestBuildCommand
: public cmCTestHandlerCommand
34 cmCTestBuildCommand();
35 ~cmCTestBuildCommand();
38 * This is a virtual constructor for the command.
40 virtual cmCommand
* Clone()
42 cmCTestBuildCommand
* ni
= new cmCTestBuildCommand
;
43 ni
->CTest
= this->CTest
;
44 ni
->CTestScriptHandler
= this->CTestScriptHandler
;
49 * The name of the command as specified in CMakeList.txt.
51 virtual const char* GetName() { return "ctest_build";}
54 * Succinct documentation.
56 virtual const char* GetTerseDocumentation()
58 return "Build the project.";
60 virtual bool InitialPass(std::vector
<std::string
> const& args
,
61 cmExecutionStatus
&status
);
65 virtual const char* GetFullDocumentation()
68 " ctest_build([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n"
69 " [NUMBER_ERRORS val] [NUMBER_WARNINGS val])\n"
70 "Builds the given build directory and stores results in Build.xml. "
71 "If no BUILD is given, the CTEST_BINARY_DIRECTORY variable is used. "
72 "The RETURN_VALUE option specifies a variable in which to store the "
73 "return value of the native build tool. "
74 "The NUMBER_ERRORS and NUMBER_WARNINGS options specify variables in "
75 "which to store the number of build errors and warnings detected."
77 CTEST_COMMAND_APPEND_OPTION_DOCS
;
80 cmTypeMacro(cmCTestBuildCommand
, cmCTestHandlerCommand
);
82 cmGlobalGenerator
* GlobalGenerator
;
85 cmCTestBuildHandler
* Handler
;
93 cmCTestGenericHandler
* InitializeHandler();