From e5d29e9e008b0de0a30dd94125d71131abb13634 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 13 Feb 2025 12:20:40 -0500 Subject: Help: Drop cmake_minimum_required pre-2.4 behavior The long outdated pre-2.4 compatibility behavior is no longer relevant since CMake 4.0 dropped support for pre-3.5 compatibility. --- Help/command/cmake_minimum_required.rst | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/Help/command/cmake_minimum_required.rst b/Help/command/cmake_minimum_required.rst index 2833ed7..d671008 100644 --- a/Help/command/cmake_minimum_required.rst +++ b/Help/command/cmake_minimum_required.rst @@ -53,9 +53,15 @@ with an error instead of just a warning. Policy Settings ^^^^^^^^^^^^^^^ -The ``cmake_minimum_required(VERSION)`` command implicitly invokes the -:command:`cmake_policy(VERSION)` command to specify that the current -project code is written for the given range of CMake versions. +``cmake_minimum_required(VERSION [...])`` implicitly invokes + +.. code-block:: cmake + + cmake_policy(VERSION [...]) + +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 and introduced in the ```` (or ````, if specified) version or earlier will be set to use ``NEW`` behavior. All policies introduced in later @@ -64,23 +70,6 @@ versions will be unset (unless the This effectively requests behavior preferred as of a given CMake version and tells newer CMake versions to warn about their new policies. -When a ```` version higher than 2.4 is specified the command -implicitly invokes - -.. code-block:: cmake - - cmake_policy(VERSION [...]) - -which sets CMake policies based on the range of versions specified. -When a ```` version 2.4 or lower is given the command implicitly -invokes - -.. code-block:: cmake - - cmake_policy(VERSION 2.4[...]) - -which enables compatibility features for CMake 2.4 and lower. - .. include:: DEPRECATED_POLICY_VERSIONS.txt See Also -- cgit v0.12