diff options
author | Brad King <brad.king@kitware.com> | 2018-03-06 19:21:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-07 12:48:40 (GMT) |
commit | 7723e9a058c579e3535df9bbe62ea218200e4250 (patch) | |
tree | a884f7554a019e372ef9862358a92bb60e4b7799 /Help | |
parent | 2124a1364a620084c24d5654c2106e5aea88c55c (diff) | |
download | CMake-7723e9a058c579e3535df9bbe62ea218200e4250.zip CMake-7723e9a058c579e3535df9bbe62ea218200e4250.tar.gz CMake-7723e9a058c579e3535df9bbe62ea218200e4250.tar.bz2 |
Do not produce legacy _LIB_DEPENDS cache entries
Introduce policy `CMP0073` to avoid producing these cache entries.
Fixes: #16364
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 8 | ||||
-rw-r--r-- | Help/policy/CMP0073.rst | 25 | ||||
-rw-r--r-- | Help/release/dev/avoid-LIB_DEPENDS.rst | 5 |
3 files changed, 38 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 96d5c7d..254656a 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -51,6 +51,14 @@ The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used to determine whether to report an error on use of deprecated macros or functions. +Policies Introduced by CMake 3.12 +================================= + +.. toctree:: + :maxdepth: 1 + + CMP0073: Do not produce legacy _LIB_DEPENDS cache entries. </policy/CMP0073> + Policies Introduced by CMake 3.11 ================================= diff --git a/Help/policy/CMP0073.rst b/Help/policy/CMP0073.rst new file mode 100644 index 0000000..9bfa0e9 --- /dev/null +++ b/Help/policy/CMP0073.rst @@ -0,0 +1,25 @@ +CMP0073 +------- + +Do not produce legacy ``_LIB_DEPENDS`` cache entries. + +Ancient CMake versions once used ``<tgt>_LIB_DEPENDS`` cache entries to +propagate library link dependencies. This has long been done by other +means, leaving the :command:`export_library_dependencies` command as the +only user of these values. That command has long been disallowed by +policy :policy:`CMP0033`, but the ``<tgt>_LIB_DEPENDS`` cache entries +were left for compatibility with possible non-standard uses by projects. + +CMake 3.12 and above now prefer to not produce these cache entries +at all. This policy provides compatibility with projects that have +not been updated to avoid using them. + +The ``OLD`` behavior for this policy is to set ``<tgt>_LIB_DEPENDS`` cache +entries. The ``NEW`` behavior for this policy is to not set them. + +This policy was introduced in CMake version 3.12. Use the +:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +Unlike most policies, CMake version |release| does *not* warn +when this policy is not set and simply uses ``OLD`` behavior. + +.. include:: DEPRECATED.txt diff --git a/Help/release/dev/avoid-LIB_DEPENDS.rst b/Help/release/dev/avoid-LIB_DEPENDS.rst new file mode 100644 index 0000000..b89d8f9 --- /dev/null +++ b/Help/release/dev/avoid-LIB_DEPENDS.rst @@ -0,0 +1,5 @@ +avoid-LIB_DEPENDS +----------------- + +* CMake no longer produces ``<tgt>_LIB_DEPENDS`` cache entries + for library targets. See policy :policy:`CMP0073`. |