1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
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 cmBuildCommand_h
13 #define cmBuildCommand_h
15 #include "cmCommand.h"
17 /** \class cmBuildCommand
18 * \brief build_command command
20 * cmBuildCommand implements the build_command CMake command
22 class cmBuildCommand : public cmCommand
26 * This is a virtual constructor for the command.
28 virtual cmCommand* Clone()
30 return new cmBuildCommand;
34 * This is called when the command is first encountered in
35 * the CMakeLists.txt file.
37 virtual bool InitialPass(std::vector<std::string> const& args,
38 cmExecutionStatus &status);
41 * The primary command signature with optional, KEYWORD-based args.
43 virtual bool MainSignature(std::vector<std::string> const& args);
46 * Legacy "exactly 2 args required" signature.
48 virtual bool TwoArgsSignature(std::vector<std::string> const& args);
51 * The name of the command as specified in CMakeList.txt.
53 virtual const char* GetName() const {return "build_command";}
56 * Succinct documentation.
58 virtual const char* GetTerseDocumentation() const
60 return "Get the command line to build this project.";
66 virtual const char* GetFullDocumentation() const
69 " build_command(<variable>\n"
70 " [CONFIGURATION <config>]\n"
71 " [PROJECT_NAME <projname>]\n"
72 " [TARGET <target>])\n"
73 "Sets the given <variable> to a string containing the command line "
74 "for building one configuration of a target in a project using the "
75 "build tool appropriate for the current CMAKE_GENERATOR.\n"
76 "If CONFIGURATION is omitted, CMake chooses a reasonable default "
77 "value for multi-configuration generators. CONFIGURATION is "
78 "ignored for single-configuration generators.\n"
79 "If PROJECT_NAME is omitted, the resulting command line will build "
80 "the top level PROJECT in the current build tree.\n"
81 "If TARGET is omitted, the resulting command line will build "
82 "everything, effectively using build target 'all' or 'ALL_BUILD'.\n"
83 " build_command(<cachevariable> <makecommand>)\n"
84 "This second signature is deprecated, but still available for "
85 "backwards compatibility. Use the first signature instead.\n"
86 "Sets the given <cachevariable> to a string containing the command "
87 "to build this project from the root of the build tree using "
88 "the build tool given by <makecommand>. <makecommand> should be "
89 "the full path to msdev, devenv, nmake, make or one of the end "
94 cmTypeMacro(cmBuildCommand, cmCommand);