1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmProjectCommand.h,v $
6 Date: $Date: 2002-04-02 20:42:13 $
7 Version: $Revision: 1.8 $
9 Copyright (c) 2002 Insight Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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 "cmStandardIncludes.h"
21 #include "cmCommand.h"
23 /** \class cmProjectCommand
24 * \brief Specify the name for this build project.
26 * cmProjectCommand is used to specify a name for this build project.
27 * It is defined once per set of CMakeList.txt files (including
28 * all subdirectories). Currently it just sets the name of the workspace
29 * file for Microsoft Visual C++
31 class cmProjectCommand
: public cmCommand
35 * This is a virtual constructor for the command.
37 virtual cmCommand
* Clone()
39 return new cmProjectCommand
;
43 * This is called when the command is first encountered in
44 * the CMakeLists.txt file.
46 virtual bool InitialPass(std::vector
<std::string
> const& args
);
49 * The name of the command as specified in CMakeList.txt.
51 virtual const char* GetName() {return "PROJECT";}
54 * This determines if the command gets propagated down
55 * to makefiles located in subdirectories.
57 virtual bool IsInherited()
63 * Succinct documentation.
65 virtual const char* GetTerseDocumentation()
67 return "Set a name for the entire project. One argument.";
73 virtual const char* GetFullDocumentation()
76 "PROJECT(projectname [C++ C Java])\n"
77 "Sets the name of the project. "
78 "This creates the variables projectname_BINARY_DIR and projectname_SOURCE_DIR. "
79 "Optionally you can specify which languages your project supports. "
80 "By default all languages are supported. If you do not have a C++ compiler, but want"
81 " to build a c program with cmake, then use this option.";
84 cmTypeMacro(cmProjectCommand
, cmCommand
);