mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-15 19:50:31 -06:00
Help: Clarify ...<max> behavior for policy-related commands
Affects cmake_minimum_required() and cmake_policy(VERSION)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -34,7 +34,8 @@ Commands
|
||||
* The :command:`cmake_minimum_required` and :command:`cmake_policy(VERSION)`
|
||||
commands now accept a version range using the form ``<min>[...<max>]``.
|
||||
The ``<min>`` version is required but policies are set based on the
|
||||
``<max>`` version. This allows projects to specify a range of versions
|
||||
older of the running CMake version and the version specified by
|
||||
``<max>``. This allows projects to specify a range of versions
|
||||
for which they have been updated and avoid explicit policy settings.
|
||||
|
||||
* The :command:`file(GLOB)` and :command:`file(GLOB_RECURSE)` commands
|
||||
|
||||
Reference in New Issue
Block a user