From 7f7175e0cdb51c11f3210c7254598cfcd8d8561f Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sun, 16 Nov 2025 05:54:58 -0500 Subject: [PATCH] Help: Add target for policy deprecation link In the policy pages' "deprecated by definition" box, instead of linking that phrase to the `cmake-policies(7)` manual page, add a label (`_cmake-policies-intro`) above the "Introduction" section, and link to that label using the `:ref:` role instead. This avoids landing the reader at the `cmake-policies(7)` table of contents, which is now long enough that it's likely to fill their entire screen unless they scroll down! As an added bonus, using `:ref:` instead of `:manual:` avoids applying monospace formatting to the link text. --- Help/manual/cmake-policies.7.rst | 2 ++ Help/policy/include/DEPRECATED.rst | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 90b5e822bb..97d74ba6c6 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -7,6 +7,8 @@ cmake-policies(7) .. contents:: +.. _cmake-policies-intro: + Introduction ============ diff --git a/Help/policy/include/DEPRECATED.rst b/Help/policy/include/DEPRECATED.rst index f66de55ae9..4cec1bb8c7 100644 --- a/Help/policy/include/DEPRECATED.rst +++ b/Help/policy/include/DEPRECATED.rst @@ -1,4 +1,4 @@ .. note:: The ``OLD`` behavior of a policy is - :manual:`deprecated by definition ` + :ref:`deprecated by definition ` and may be removed in a future version of CMake.