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 cmCMakeMinimumRequired_h
13 #define cmCMakeMinimumRequired_h
15 #include "cmCommand.h"
17 /** \class cmCMakeMinimumRequired
18 * \brief cmake_minimum_required command
20 * cmCMakeMinimumRequired implements the cmake_minimum_required CMake command
22 class cmCMakeMinimumRequired : public cmCommand
26 * This is a virtual constructor for the command.
28 virtual cmCommand* Clone()
30 return new cmCMakeMinimumRequired;
34 * This is called when the command is first encountered in
35 * the CMakeLists.txt file.
37 virtual bool InitialPass(std::vector<std::string> const& args,
38 cmExecutionStatus &status);
41 * This determines if the command is invoked when in script mode.
43 virtual bool IsScriptable() const { return true; }
46 * The name of the command as specified in CMakeList.txt.
48 virtual const char* GetName() const {return "cmake_minimum_required";}
51 * Succinct documentation.
53 virtual const char* GetTerseDocumentation() const
55 return "Set the minimum required version of cmake for a project.";
61 virtual const char* GetFullDocumentation() const
64 " cmake_minimum_required(VERSION major[.minor[.patch[.tweak]]]\n"
66 "If the current version of CMake is lower than that required "
67 "it will stop processing the project and report an error. "
68 "When a version higher than 2.4 is specified the command implicitly "
70 " cmake_policy(VERSION major[.minor[.patch[.tweak]]])\n"
71 "which sets the cmake policy version level to the version specified. "
72 "When version 2.4 or lower is given the command implicitly invokes\n"
73 " cmake_policy(VERSION 2.4)\n"
74 "which enables compatibility features for CMake 2.4 and lower.\n"
75 "The FATAL_ERROR option is accepted but ignored by CMake 2.6 "
77 "It should be specified so CMake versions 2.4 and lower fail with an "
78 "error instead of just a warning.";
81 cmTypeMacro(cmCMakeMinimumRequired, cmCommand);
84 std::vector<std::string> UnknownArguments;
85 bool EnforceUnknownArguments();