From 3e0720a2ae1fbaa595435021f1e37e739f8a1203 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 20 Jan 2025 17:11:27 -0500 Subject: Help: Add cmake_minimum_required(VERSION) example to cmake-policies(7) --- Help/dev/maint.rst | 7 +++++++ Help/manual/cmake-policies.7.rst | 17 ++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Help/dev/maint.rst b/Help/dev/maint.rst index 4a6eea8..2f4babc 100644 --- a/Help/dev/maint.rst +++ b/Help/dev/maint.rst @@ -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 ``...`` +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 diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index c5ce23b..11849b9 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -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 ...`` syntax enables the ``NEW`` behaviors -of policies introduced in version ```` 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 ``...`` 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 ------------------- -- cgit v0.12