1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmEnableLanguageCommand.h,v $
6 Date: $Date: 2009-09-03 19:29:29 $
7 Version: $Revision: 1.9 $
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 cmEnableLanguageCommand_h
18 #define cmEnableLanguageCommand_h
20 #include "cmCommand.h"
22 /** \class cmEnableLanguageCommand
23 * \brief Specify the name for this build project.
25 * cmEnableLanguageCommand 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 cmEnableLanguageCommand
: public cmCommand
34 * This is a virtual constructor for the command.
36 virtual cmCommand
* Clone()
38 return new cmEnableLanguageCommand
;
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 "enable_language";}
54 * Succinct documentation.
56 virtual const char* GetTerseDocumentation()
58 return "Enable a language (CXX/C/Fortran/etc)";
64 virtual const char* GetFullDocumentation()
67 " enable_language(languageName [OPTIONAL] )\n"
68 "This command enables support for the named language in CMake. "
69 "This is the same as the project command but does not create "
70 "any of the extra variables that are created by the project command. "
71 "Example languages are CXX, C, Fortran. "
72 "If OPTIONAL is used, use the CMAKE_<languageName>_COMPILER_WORKS "
73 "variable to check whether the language has been enabled successfully.";
76 cmTypeMacro(cmEnableLanguageCommand
, cmCommand
);