Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmAddExecutableCommand.h
bloba88d751052709e074beaac686ba5d0ea1c6f2f9a
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmAddExecutableCommand.h,v $
5 Language: C++
6 Date: $Date: 2008/01/28 13:38:35 $
7 Version: $Revision: 1.20 $
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 cmExecutablesCommand_h
18 #define cmExecutablesCommand_h
20 #include "cmCommand.h"
22 /** \class cmExecutablesCommand
23 * \brief Defines a list of executables to build.
25 * cmExecutablesCommand defines a list of executable (i.e., test)
26 * programs to create.
28 class cmAddExecutableCommand : public cmCommand
30 public:
31 /**
32 * This is a virtual constructor for the command.
34 virtual cmCommand* Clone()
36 return new cmAddExecutableCommand;
39 /**
40 * This is called when the command is first encountered in
41 * the CMakeLists.txt file.
43 virtual bool InitialPass(std::vector<std::string> const& args,
44 cmExecutionStatus &status);
46 /**
47 * The name of the command as specified in CMakeList.txt.
49 virtual const char* GetName() { return "add_executable";}
51 /**
52 * Succinct documentation.
54 virtual const char* GetTerseDocumentation()
56 return
57 "Add an executable to the project using the specified source files.";
60 /**
61 * More documentation.
63 virtual const char* GetFullDocumentation()
65 return
66 " add_executable(exename [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]\n"
67 " source1 source2 ... sourceN)\n"
68 "This command adds an executable target to the current directory. "
69 "The executable will be built from the list of source files "
70 "specified.\n"
71 "After specifying the executable name, WIN32 and/or MACOSX_BUNDLE can "
72 "be specified. WIN32 indicates that the executable (when compiled on "
73 "windows) is a windows app (using WinMain) not a console app "
74 "(using main). The variable CMAKE_MFC_FLAG be used if the windows app "
75 "uses MFC. This variable can be set to the following values:\n"
76 " 0: Use Standard Windows Libraries\n"
77 " 1: Use MFC in a Static Library\n"
78 " 2: Use MFC in a Shared DLL\n"
79 "MACOSX_BUNDLE indicates that when build on Mac OSX, executable should "
80 "be in the bundle form. The MACOSX_BUNDLE also allows several "
81 "variables to be specified:\n"
82 " MACOSX_BUNDLE_INFO_STRING\n"
83 " MACOSX_BUNDLE_ICON_FILE\n"
84 " MACOSX_BUNDLE_GUI_IDENTIFIER\n"
85 " MACOSX_BUNDLE_LONG_VERSION_STRING\n"
86 " MACOSX_BUNDLE_BUNDLE_NAME\n"
87 " MACOSX_BUNDLE_SHORT_VERSION_STRING\n"
88 " MACOSX_BUNDLE_BUNDLE_VERSION\n"
89 " MACOSX_BUNDLE_COPYRIGHT\n"
90 "If EXCLUDE_FROM_ALL is given the target will not be built by default. "
91 "It will be built only if the user explicitly builds the target or "
92 "another target that requires the target depends on it."
93 "\n"
94 "The add_executable command can also create IMPORTED executable "
95 "targets using this signature:\n"
96 " add_executable(<name> IMPORTED)\n"
97 "An IMPORTED executable target references an executable file located "
98 "outside the project. "
99 "No rules are generated to build it. "
100 "The target name has scope in the directory in which it is created "
101 "and below. "
102 "It may be referenced like any target built within the project. "
103 "IMPORTED executables are useful for convenient reference from "
104 "commands like add_custom_command. "
105 "Details about the imported executable are specified by setting "
106 "properties whose names begin in \"IMPORTED_\". "
107 "The most important such property is IMPORTED_LOCATION "
108 "(and its per-configuration version IMPORTED_LOCATION_<CONFIG>) "
109 "which specifies the location of the main executable file on disk. "
110 "See documentation of the IMPORTED_* properties for more information."
114 cmTypeMacro(cmAddExecutableCommand, cmCommand);
118 #endif