mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-16 20:21:41 -06:00
Help: Add cmake_minimum_required(VERSION) example to cmake-policies(7)
This commit is contained in:
@@ -302,6 +302,13 @@ Update ``Source/CMakeVersion.cmake`` to set the version to
|
||||
set(CMake_VERSION_PATCH $date)
|
||||
#set(CMake_VERSION_RC 0)
|
||||
|
||||
Update ``Help/manual/cmake-policies.7.rst`` to set the ``...<max>``
|
||||
example to ``...$major.$minor``:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
cmake_minimum_required(VERSION 3.10...$major.$minor)
|
||||
|
||||
Commit with a message such as::
|
||||
|
||||
Begin post-$ver development
|
||||
|
||||
@@ -27,9 +27,20 @@ as soon as possible.
|
||||
|
||||
Use the :command:`cmake_minimum_required` command to record the latest
|
||||
version of CMake for which a project has been updated.
|
||||
The ``VERSION <min>...<policy_max>`` syntax enables the ``NEW`` behaviors
|
||||
of policies introduced in version ``<policy_max>`` and earlier without
|
||||
increasing the minimum version of CMake required by the project.
|
||||
For example:
|
||||
|
||||
..
|
||||
Sync this cmake_minimum_required example with ``Help/dev/maint.rst``.
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
cmake_minimum_required(VERSION 3.10...3.31)
|
||||
|
||||
This uses the ``<min>...<max>`` syntax to enable the ``NEW`` behaviors
|
||||
of policies introduced in CMake 3.31 and earlier while only requiring a
|
||||
minimum version of CMake 3.10. The project is expected to work with
|
||||
both the ``OLD`` and ``NEW`` behaviors of policies introduced between
|
||||
those versions.
|
||||
|
||||
Transition Schedule
|
||||
-------------------
|
||||
|
||||
Reference in New Issue
Block a user