diff options
author | Brad King <brad.king@kitware.com> | 2021-04-21 14:44:51 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-04-21 14:45:11 (GMT) |
commit | 6f7ab69026171bf603b9ba5068c54c6df4fe21b1 (patch) | |
tree | 10456aa90898c4468f15b42b6a40d019f9e80fe9 | |
parent | 52823d035bf1a6811fd79af096a9e943a5411444 (diff) | |
parent | b94bf12a310717cc548033dd69337c363d0b3e6f (diff) | |
download | CMake-6f7ab69026171bf603b9ba5068c54c6df4fe21b1.zip CMake-6f7ab69026171bf603b9ba5068c54c6df4fe21b1.tar.gz CMake-6f7ab69026171bf603b9ba5068c54c6df4fe21b1.tar.bz2 |
Merge topic 'better_explain_policy_value'
b94bf12a31 Help: cmake_minimum_required specify max is only for policies
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6023
-rw-r--r-- | Help/command/cmake_minimum_required.rst | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Help/command/cmake_minimum_required.rst b/Help/command/cmake_minimum_required.rst index c3b3e73..2cc3cfe 100644 --- a/Help/command/cmake_minimum_required.rst +++ b/Help/command/cmake_minimum_required.rst @@ -5,21 +5,21 @@ Require a minimum version of cmake. .. code-block:: cmake - cmake_minimum_required(VERSION <min>[...<max>] [FATAL_ERROR]) + cmake_minimum_required(VERSION <min>[...<policy_max>] [FATAL_ERROR]) .. versionadded:: 3.12 - The optional ``<max>`` version. + The optional ``<policy_max>`` version. Sets the minimum required version of cmake for a project. Also updates the policy settings as explained below. -``<min>`` and the optional ``<max>`` are each CMake versions of the form -``major.minor[.patch[.tweak]]``, and the ``...`` is literal. +``<min>`` and the optional ``<policy_max>`` are each CMake versions of the +form ``major.minor[.patch[.tweak]]``, and the ``...`` is literal. If the running version of CMake is lower than the ``<min>`` required version it will stop processing the project and report an error. -The optional ``<max>`` version, if specified, must be at least the -``<min>`` version and affects policy settings as described below. +The optional ``<policy_max>`` version, if specified, must be at least the +``<min>`` version and affects policy settings as described in `Policy Settings`_. If the running version of CMake is older than 3.12, the extra ``...`` dots will be seen as version component separators, resulting in the ``...<max>`` part being ignored and preserving the pre-3.12 behavior @@ -43,6 +43,8 @@ with an error instead of just a warning. limits some effects to the function scope when invoked. Such calls should not be made with the intention of having global effects. +.. _`Policy Settings`: + Policy Settings ^^^^^^^^^^^^^^^ |