1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmProjectCommand.h,v $
6 Date: $Date: 2008-01-23 15:27:59 $
7 Version: $Revision: 1.16 $
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 [CXX] [C] [Java])\n"
68 "Sets the name of the project. "
69 "This creates the variables projectname_BINARY_DIR and "
70 "projectname_SOURCE_DIR. "
71 "Optionally you can specify which languages your project supports. "
72 "By default all languages are supported. If you do not have a "
73 "C++ compiler, but want"
74 " to build a c program with cmake, then use this option.";
77 cmTypeMacro(cmProjectCommand
, cmCommand
);