Merge topic 'remove-old-compatibility'

785523a136 Remove compatibility with CMake versions older than 2.8.0
35282387ea CMP0014: Remove support for OLD behavior
fad9c55b8b CMP0013: Remove support for OLD behavior
98a59ba8ad CMP0012: Remove support for OLD behavior
3c0dbb66f5 CMP0011: Remove support for OLD behavior
cf832e75bc CMP0010: Remove support for OLD behavior
77f8c374f3 CMP0009: Remove support for OLD behavior
43ef139567 CMP0008: Remove support for OLD behavior
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10188
This commit is contained in:
Brad King
2025-01-18 14:50:10 +00:00
committed by Kitware Robot
102 changed files with 238 additions and 1277 deletions
@@ -1,3 +1,11 @@
.. versionchanged:: 4.0
Compatibility with versions of CMake older than 2.8.0 is removed.
Calls to :command:`cmake_minimum_required(VERSION)` or
:command:`cmake_policy(VERSION)` that do not specify at least
2.8.0 as their policy version (optionally via ``...<max>``)
will produce an error in CMake 4.0 and above.
.. versionchanged:: 3.31
Compatibility with versions of CMake older than 3.10 is deprecated.
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0000
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
A minimum required CMake version must be specified.
CMake requires that projects specify the version of CMake to which
@@ -26,7 +29,5 @@ behavior was to silently ignore the missing invocation. The ``NEW``
behavior is to issue an error instead of a warning.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+6 -5
View File
@@ -1,11 +1,14 @@
CMP0001
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
``CMAKE_BACKWARDS_COMPATIBILITY`` should no longer be used.
The behavior is to check ``CMAKE_BACKWARDS_COMPATIBILITY`` and present
it to the user. The ``NEW`` behavior is to ignore
CMAKE_BACKWARDS_COMPATIBILITY completely.
``CMAKE_BACKWARDS_COMPATIBILITY`` completely.
In CMake 2.4 and below the variable ``CMAKE_BACKWARDS_COMPATIBILITY`` was
used to request compatibility with earlier versions of CMake. In
@@ -15,7 +18,5 @@ and the :command:`cmake_policy` command. However, CMake must still check
below.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0002
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
Logical target names must be globally unique.
Targets names created with :command:`add_executable`, :command:`add_library`, or
@@ -22,7 +25,5 @@ must simply have globally unique names (unless one uses the global
property :prop_gbl:`ALLOW_DUPLICATE_CUSTOM_TARGETS` with a Makefiles generator).
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0003
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
Libraries linked via full path no longer produce linker search paths.
This policy affects how libraries whose full paths are NOT known are
@@ -98,7 +101,5 @@ target. This avoids flooding users with messages for every target
when setting the policy once will probably fix all targets.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0004
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
Libraries linked may not have leading or trailing whitespace.
CMake versions 2.4 and below silently removed leading and trailing
@@ -20,7 +23,5 @@ target is created by an :command:`add_executable` or :command:`add_library`
command.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0005
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
Preprocessor definition values are now escaped automatically.
This policy determines whether or not CMake should generate escaped
@@ -20,7 +23,5 @@ See documentation of the ``COMPILE_DEFINITIONS`` target property for
limitations of the escaping implementation.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0006
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
Installing :prop_tgt:`MACOSX_BUNDLE` targets requires a ``BUNDLE DESTINATION``.
This policy determines whether the :command:`install(TARGETS)` command must be
@@ -18,7 +21,5 @@ behavior for this policy is to produce an error if a bundle target is installed
without a ``BUNDLE DESTINATION``.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0007
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
list command no longer ignores empty elements.
This policy determines whether the list command will ignore empty
@@ -11,7 +14,5 @@ elements. The ``NEW`` behavior for this policy is to correctly count
empty elements in a list.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0008
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
Libraries linked by full-path must have a valid library file name.
In CMake 2.4 and below it is possible to write code like
@@ -29,7 +32,5 @@ it. The ``NEW`` behavior for this policy is to trust the given path and
pass it directly to the native build tool unchanged.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.1
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0009
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
FILE GLOB_RECURSE calls should not follow symlinks by default.
In CMake 2.6.1 and below, :command:`file(GLOB_RECURSE)` calls would follow
@@ -15,7 +18,5 @@ to follow the symlinks by default, but only if ``FOLLOW_SYMLINKS`` is given
as an additional argument to the ``FILE`` command.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.2
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0010
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
Bad variable reference syntax is an error.
In CMake 2.6.2 and below, incorrect variable reference syntax such as
@@ -14,7 +17,5 @@ If :policy:`CMP0053` is set to ``NEW``, this policy has no effect
and is treated as always being ``NEW``.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.3
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0011
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
Included scripts do automatic :command:`cmake_policy` PUSH and POP.
In CMake 2.6.2 and below, CMake Policy settings in scripts loaded by
@@ -19,7 +22,5 @@ The ``NEW`` behavior for this policy is to allow the commands to do
their default cmake_policy ``PUSH`` and ``POP``.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.3
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0012
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
:command:`if` recognizes numbers and boolean constants.
In CMake versions 2.6.4 and lower the :command:`if` command implicitly
@@ -22,7 +25,5 @@ for this policy is to recognize numbers and boolean constants without
dereferencing variables with such names.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0013
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
Duplicate binary directories are not allowed.
CMake 2.6.3 and below silently permitted add_subdirectory() calls to
@@ -15,7 +18,5 @@ behavior for this policy is to disallow duplicate binary directories
with an error.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+5 -4
View File
@@ -1,6 +1,9 @@
CMP0014
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
Input directories must have ``CMakeLists.txt``.
CMake versions before 2.8 silently ignored missing ``CMakeLists.txt``
@@ -11,7 +14,5 @@ The ``OLD`` behavior for this policy is to silently ignore the problem.
The ``NEW`` behavior for this policy is to report an error.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
.. include:: DEPRECATED.txt
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt
+4
View File
@@ -0,0 +1,4 @@
This policy was introduced in CMake version |INTRODUCED_IN_CMAKE_VERSION|.
Prior to removal in CMake version |REMOVED_IN_CMAKE_VERSION|, it could be
set by :command:`cmake_policy` or :command:`cmake_minimum_required`.
If it was not set, CMake |WARNED_OR_DID_NOT_WARN|, and used ``OLD`` behavior.
+5
View File
@@ -0,0 +1,5 @@
.. warning::
The ``OLD`` behavior of this policy was removed
in CMake version |REMOVED_IN_CMAKE_VERSION|.
This policy must be set to ``NEW`` by a call to
:command:`cmake_minimum_required` or :command:`cmake_policy`.
@@ -0,0 +1,10 @@
remove-old-compatibility
------------------------
* Compatibility with versions of CMake older than 2.8.0 has been removed.
Calls to :command:`cmake_minimum_required` or :command:`cmake_policy`
that set the policy version to an older value now issue an error.
Note that calls to those commands can still support older versions of
CMake by using their ``VERSION`` arguments' ``<min>...<max>`` syntax.
This requires only the ``<min>`` version of CMake, but when running a
newer version, sets policies up to the ``<max>`` version.
@@ -1,4 +1,4 @@
CMAKE_BACKWARDS_COMPATIBILITY
-----------------------------
Deprecated. See CMake Policy :policy:`CMP0001` documentation.
Removed. See policy :policy:`CMP0001`.