Просмотр исходного кода

FindHg: Sync module documentation

- Added intro code block with find_package() showing how to find the
  package with this module.
- Used "command" instead of "macro".
- Synced descriptions with other similar find modules.
Peter Kokot 8 месяцев назад
Родитель
Сommit
50769f3f10
2 измененных файлов с 12 добавлено и 7 удалено
  1. 1 1
      Help/release/3.1.rst
  2. 11 6
      Modules/FindHg.cmake

+ 1 - 1
Help/release/3.1.rst

@@ -235,7 +235,7 @@ Modules
 
 * The :module:`FindGLUT` module now provides imported targets.
 
-* The :module:`FindHg` module gained a new ``Hg_WC_INFO`` macro to
+* The :module:`FindHg` module gained a new ``Hg_WC_INFO`` command to
   help run ``hg`` to extract information about a Mercurial work copy.
 
 * The :module:`FindOpenCL` module was introduced.

+ 11 - 6
Modules/FindHg.cmake

@@ -6,16 +6,21 @@ FindHg
 ------
 
 Finds the Mercurial command-line client executable (``hg``) and provides a
-command for extracting information from a Mercurial working copy.
+command for extracting information from a Mercurial working copy:
+
+.. code-block:: cmake
+
+  find_package(Hg [<version>] [...])
 
 Result Variables
 ^^^^^^^^^^^^^^^^
 
-This module sets the following variables:
+This module defines the following variables:
 
 ``Hg_FOUND``
-  Boolean indicating whether the Mercurial client was found.  For backward
-  compatibility, the ``HG_FOUND`` variable is also set to the same value.
+  Boolean indicating whether (the requested version of) Mercurial client is
+  found.  For backward compatibility, the ``HG_FOUND`` variable is also set
+  to the same value.
 
 ``HG_VERSION_STRING``
   The version of Mercurial found.
@@ -31,7 +36,7 @@ The following cache variables may also be set:
 Commands
 ^^^^^^^^
 
-This module defines the following command when Mercurial client (``hg``) is
+This module provides the following command when Mercurial client (``hg``) is
 found:
 
 .. command:: Hg_WC_INFO
@@ -44,7 +49,7 @@ found:
 
     Hg_WC_INFO(<dir> <var-prefix>)
 
-  This macro defines the following variables if running Mercurial client on
+  This command defines the following variables if running Mercurial client on
   working copy located at a given location ``<dir>`` succeeds; otherwise a
   ``SEND_ERROR`` message is generated: