diff options
author | Craig Scott <craig.scott@crascit.com> | 2018-06-30 22:05:01 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2018-07-01 22:41:46 (GMT) |
commit | 19f338109d8909feba37513285afe4a583811d54 (patch) | |
tree | 57ce561dc8bc15704a13fbf8db04ea4a431386fd /Help/command | |
parent | 51e7d4150756a01d51da38acfd0a469b138e1fde (diff) | |
download | CMake-19f338109d8909feba37513285afe4a583811d54.zip CMake-19f338109d8909feba37513285afe4a583811d54.tar.gz CMake-19f338109d8909feba37513285afe4a583811d54.tar.bz2 |
Help: Clarify ...<max> behavior for policy-related commands
Affects cmake_minimum_required() and cmake_policy(VERSION)
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/cmake_minimum_required.rst | 4 | ||||
-rw-r--r-- | Help/command/cmake_policy.rst | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/Help/command/cmake_minimum_required.rst b/Help/command/cmake_minimum_required.rst index 7c02190..2f1ab60 100644 --- a/Help/command/cmake_minimum_required.rst +++ b/Help/command/cmake_minimum_required.rst @@ -13,6 +13,10 @@ 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. +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 +of basing policies on ``<min>``. The ``FATAL_ERROR`` option is accepted but ignored by CMake 2.6 and higher. It should be specified so CMake versions 2.4 and lower fail diff --git a/Help/command/cmake_policy.rst b/Help/command/cmake_policy.rst index 6a8dd62..c3f7cfb 100644 --- a/Help/command/cmake_policy.rst +++ b/Help/command/cmake_policy.rst @@ -30,7 +30,10 @@ encourage projects to set policies based on CMake versions:: ``major.minor[.patch[.tweak]]``, and the ``...`` is literal. The ``<min>`` version must be at least ``2.4`` and at most the running version of CMake. The ``<max>`` version, if specified, must be at least the ``<min>`` version -but may exceed the running version of CMake. +but may exceed the running version of CMake. 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 of basing policies on ``<min>``. This specifies that the current CMake code is written for the given range of CMake versions. All policies known to the running version of CMake |