STYLE: Fix typo in GetFilenameLastExtension docs
[cmake.git] / Source / cmAddSubDirectoryCommand.h
blob146c340a975b2da0e160de80143a231f08cb9d9f
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmAddSubDirectoryCommand.h,v $
5 Language: C++
6 Date: $Date: 2008-08-07 21:12:16 $
7 Version: $Revision: 1.8 $
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 cmAddSubDirectoryCommand_h
18 #define cmAddSubDirectoryCommand_h
20 #include "cmCommand.h"
22 /** \class cmAddSubDirectoryCommand
23 * \brief Specify a subdirectory to build
25 * cmAddSubDirectoryCommand specifies a subdirectory to process
26 * by CMake. CMake will descend
27 * into the specified source directory and process any CMakeLists.txt found.
29 class cmAddSubDirectoryCommand : public cmCommand
31 public:
32 /**
33 * This is a virtual constructor for the command.
35 virtual cmCommand* Clone()
37 return new cmAddSubDirectoryCommand;
40 /**
41 * This is called when the command is first encountered in
42 * the CMakeLists.txt file.
44 virtual bool InitialPass(std::vector<std::string> const& args,
45 cmExecutionStatus &status);
47 /**
48 * The name of the command as specified in CMakeList.txt.
50 virtual const char* GetName() { return "add_subdirectory";}
52 /**
53 * Succinct documentation.
55 virtual const char* GetTerseDocumentation()
57 return "Add a subdirectory to the build.";
60 /**
61 * More documentation.
63 virtual const char* GetFullDocumentation()
65 return
66 " add_subdirectory(source_dir [binary_dir] \n"
67 " [EXCLUDE_FROM_ALL])\n"
68 "Add a subdirectory to the build. The source_dir specifies the "
69 "directory in which the source CmakeLists.txt and code files are "
70 "located. If it is a relative "
71 "path it will be evaluated with respect to the current "
72 "directory (the typical usage), but it may also be an absolute path. "
73 "The binary_dir specifies the directory in which to place the output "
74 "files. If it is a relative path it will be evaluated with respect "
75 "to the current output directory, but it may also be an absolute "
76 "path. If binary_dir is not specified, the value of source_dir, "
77 "before expanding any relative path, will be used (the typical usage). "
78 "The CMakeLists.txt file in the specified source directory will "
79 "be processed immediately by CMake before processing in the current "
80 "input file continues beyond this command.\n"
82 "If the EXCLUDE_FROM_ALL argument is provided then targets in the "
83 "subdirectory will not be included in the ALL target of the parent "
84 "directory by default, and will be excluded from IDE project files. "
85 "Users must explicitly build targets in the subdirectory. "
86 "This is meant for use when the subdirectory contains a separate part "
87 "of the project that is useful but not necessary, such as a set of "
88 "examples. "
89 "Typically the subdirectory should contain its own project() command "
90 "invocation so that a full build system will be generated in the "
91 "subdirectory (such as a VS IDE solution file). "
92 "Note that inter-target dependencies supercede this exclusion. "
93 "If a target built by the parent project depends on a target in the "
94 "subdirectory, the dependee target will be included in the parent "
95 "project build system to satisfy the dependency."
99 cmTypeMacro(cmAddSubDirectoryCommand, cmCommand);
104 #endif