1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmProjectCommand.h,v $
6 Date: $Date: 2009-03-12 22:43:17 $
7 Version: $Revision: 1.17 $
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 cmProjectCommand_h
18 #define cmProjectCommand_h
20 #include "cmCommand.h"
22 /** \class cmProjectCommand
23 * \brief Specify the name for this build project.
25 * cmProjectCommand is used to specify a name for this build project.
26 * It is defined once per set of CMakeList.txt files (including
27 * all subdirectories). Currently it just sets the name of the workspace
28 * file for Microsoft Visual C++
30 class cmProjectCommand
: public cmCommand
34 * This is a virtual constructor for the command.
36 virtual cmCommand
* Clone()
38 return new cmProjectCommand
;
42 * This is called when the command is first encountered in
43 * the CMakeLists.txt file.
45 virtual bool InitialPass(std::vector
<std::string
> const& args
,
46 cmExecutionStatus
&status
);
49 * The name of the command as specified in CMakeList.txt.
51 virtual const char* GetName() {return "project";}
54 * Succinct documentation.
56 virtual const char* GetTerseDocumentation()
58 return "Set a name for the entire project.";
64 virtual const char* GetFullDocumentation()
67 " project(<projectname> [languageName1 languageName2 ... ] )\n"
68 "Sets the name of the project. "
69 "Additionally this sets the variables <projectName>_BINARY_DIR and "
70 "<projectName>_SOURCE_DIR to the respective values.\n"
71 "Optionally you can specify which languages your project supports. "
72 "Example languages are CXX (i.e. C++), C, Fortran, etc. "
73 "By default C and CXX are enabled. E.g. if you do not have a "
74 "C++ compiler, you can disable the check for it by explicitely listing "
75 "the languages you want to support, e.g. C. By using the special "
76 "language \"NONE\" all checks for any language can be disabled.";
79 cmTypeMacro(cmProjectCommand
, cmCommand
);