diff --git a/Modules/FindHg.cmake b/Modules/FindHg.cmake index a26e01f02b..c88a523213 100644 --- a/Modules/FindHg.cmake +++ b/Modules/FindHg.cmake @@ -5,42 +5,68 @@ FindHg ------ -Extract information from a mercurial working copy. +Finds the Mercurial command-line client executable (``hg``) and provides a +command for extracting information from a Mercurial working copy. -The module defines the following variables: +Result Variables +^^^^^^^^^^^^^^^^ -:: +This module sets the following variables: - HG_EXECUTABLE - path to mercurial command line client (hg) - HG_FOUND - true if the command line client was found - HG_VERSION_STRING - the version of mercurial found +``Hg_FOUND`` + Boolean indicating whether the Mercurial client was found. For backward + compatibility, the ``HG_FOUND`` variable is also set to the same value. -.. versionadded:: 3.1 - If the command line client executable is found the following macro is defined: +``HG_VERSION_STRING`` + The version of Mercurial found. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``HG_EXECUTABLE`` + Absolute path to the Mercurial command-line client (``hg``). + +Commands +^^^^^^^^ + +This module defines the following command when Mercurial client (``hg``) is +found: + +.. command:: Hg_WC_INFO + + .. versionadded:: 3.1 + + Extracts information of a Mercurial working copy: + + .. code-block:: cmake + + Hg_WC_INFO(