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 cmEnableLanguageCommand_h
13 #define cmEnableLanguageCommand_h
15 #include "cmCommand.h"
17 /** \class cmEnableLanguageCommand
18 * \brief Specify the name for this build project.
20 * cmEnableLanguageCommand 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 cmEnableLanguageCommand : public cmCommand
29 * This is a virtual constructor for the command.
31 virtual cmCommand* Clone()
33 return new cmEnableLanguageCommand;
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 "enable_language";}
49 * Succinct documentation.
51 virtual const char* GetTerseDocumentation() const
53 return "Enable a language (CXX/C/Fortran/etc)";
59 virtual const char* GetFullDocumentation() const
62 " enable_language(<lang> [OPTIONAL] )\n"
63 "This command enables support for the named language in CMake. "
64 "This is the same as the project command but does not create "
65 "any of the extra variables that are created by the project command. "
66 "Example languages are CXX, C, Fortran. "
68 "This command must be called in file scope, not in a function call. "
69 "Furthermore, it must be called in the highest directory common to "
70 "all targets using the named language directly for compiling sources "
71 "or indirectly through link dependencies. "
72 "It is simplest to enable all needed languages in the top-level "
73 "directory of a project."
75 "The OPTIONAL keyword is a placeholder for future implementation "
76 "and does not currently work.";
79 cmTypeMacro(cmEnableLanguageCommand, cmCommand);