Browse Source

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.
FeRD (Frank Dana) 2 weeks ago
parent
commit
7f7175e0cd
2 changed files with 3 additions and 1 deletions
  1. 2 0
      Help/manual/cmake-policies.7.rst
  2. 1 1
      Help/policy/include/DEPRECATED.rst

+ 2 - 0
Help/manual/cmake-policies.7.rst

@@ -7,6 +7,8 @@ cmake-policies(7)
 
    .. contents::
 
+.. _cmake-policies-intro:
+
 Introduction
 ============
 

+ 1 - 1
Help/policy/include/DEPRECATED.rst

@@ -1,4 +1,4 @@
 .. note::
   The ``OLD`` behavior of a policy is
-  :manual:`deprecated by definition <cmake-policies(7)>`
+  :ref:`deprecated by definition <cmake-policies-intro>`
   and may be removed in a future version of CMake.