BUG: Fix find_* search order with path suffixes
[cmake.git] / Source / cmAddExecutableCommand.h
bloba113ffb81d2c2d98956ba52a3934b6d4b383ca9f
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmAddExecutableCommand.h,v $
5 Language: C++
6 Date: $Date: 2008-02-11 18:35:39 $
7 Version: $Revision: 1.21 $
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(<name> [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]\n"
67 " source1 source2 ... sourceN)\n"
68 "Adds an executable target called <name> to be built from the "
69 "source files listed in the command invocation. "
70 "The <name> corresponds to the logical target name and must be "
71 "globally unique within a project. "
72 "The actual file name of the executable built is constructed based on "
73 "conventions of the native platform "
74 "(such as <name>.exe or just <name>). "
75 "\n"
76 "By default the executable file will be created in the build tree "
77 "directory corresponding to the source tree directory in which "
78 "the command was invoked. "
79 "See documentation of the RUNTIME_OUTPUT_DIRECTORY "
80 "target property to change this location. "
81 "See documentation of the OUTPUT_NAME target property to change "
82 "the <name> part of the final file name. "
83 "\n"
84 "If WIN32 is given the property WIN32_EXECUTABLE will be set on the "
85 "target created. "
86 "See documentation of that target property for details."
87 "\n"
88 "If MACOSX_BUNDLE is given the corresponding property will be "
89 "set on the created target. "
90 "See documentation of the MACOSX_BUNDLE target property for details."
91 "\n"
92 "If EXCLUDE_FROM_ALL is given the corresponding property will be "
93 "set on the created target. "
94 "See documentation of the EXCLUDE_FROM_ALL target property for "
95 "details."
96 "\n"
97 "The add_executable command can also create IMPORTED executable "
98 "targets using this signature:\n"
99 " add_executable(<name> IMPORTED)\n"
100 "An IMPORTED executable target references an executable file located "
101 "outside the project. "
102 "No rules are generated to build it. "
103 "The target name has scope in the directory in which it is created "
104 "and below. "
105 "It may be referenced like any target built within the project. "
106 "IMPORTED executables are useful for convenient reference from "
107 "commands like add_custom_command. "
108 "Details about the imported executable are specified by setting "
109 "properties whose names begin in \"IMPORTED_\". "
110 "The most important such property is IMPORTED_LOCATION "
111 "(and its per-configuration version IMPORTED_LOCATION_<CONFIG>) "
112 "which specifies the location of the main executable file on disk. "
113 "See documentation of the IMPORTED_* properties for more information."
117 cmTypeMacro(cmAddExecutableCommand, cmCommand);
121 #endif