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 cmProjectCommand_h
13 #define cmProjectCommand_h
15 #include "cmCommand.h"
17 /** \class cmProjectCommand
18 * \brief Specify the name for this build project.
20 * cmProjectCommand is used to specify a name for this build project.
21 * It is defined once per set of CMakeList.txt files (including
22 * all subdirectories). Currently it just sets the name of the workspace
23 * file for Microsoft Visual C++
25 class cmProjectCommand : public cmCommand
29 * This is a virtual constructor for the command.
31 virtual cmCommand* Clone()
33 return new cmProjectCommand;
37 * This is called when the command is first encountered in
38 * the CMakeLists.txt file.
40 virtual bool InitialPass(std::vector<std::string> const& args,
41 cmExecutionStatus &status);
44 * The name of the command as specified in CMakeList.txt.
46 virtual const char* GetName() const {return "project";}
49 * Succinct documentation.
51 virtual const char* GetTerseDocumentation() const
53 return "Set a name for the entire project.";
59 virtual const char* GetFullDocumentation() const
62 " project(<projectname> [languageName1 languageName2 ... ] )\n"
63 "Sets the name of the project. "
64 "Additionally this sets the variables <projectName>_BINARY_DIR and "
65 "<projectName>_SOURCE_DIR to the respective values.\n"
66 "Optionally you can specify which languages your project supports. "
67 "Example languages are CXX (i.e. C++), C, Fortran, etc. "
68 "By default C and CXX are enabled. E.g. if you do not have a "
69 "C++ compiler, you can disable the check for it by explicitly listing "
70 "the languages you want to support, e.g. C. By using the special "
71 "language \"NONE\" all checks for any language can be disabled. "
72 "If a variable exists called CMAKE_PROJECT_<projectName>_INCLUDE, "
73 "the file pointed to by that variable will be included as the last step "
74 "of the project command."
76 "The top-level CMakeLists.txt file for a project must contain a "
77 "literal, direct call to the project() command; loading one through "
78 "the include() command is not sufficient. "
79 "If no such call exists CMake will implicitly add one to the top that "
80 "enables the default languages (C and CXX).";
83 cmTypeMacro(cmProjectCommand, cmCommand);