mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 23:28:32 -05:00
Help: Revise docs on Scripting Commands
Revise docs for all "Scripting Commands", except four find_XXX that use a macro suite of their own. * Take full advantage of the improved syntax highlighting. * Make consequential use of <..> placeholders. * Clarify things here and there in the text. Specific improvements to some command docs: * "math": Correct description of novel hexadecimal capability. * "if", "foreach", "while": Provide link to "endif" etc * "foreach", "while": Mention "break" and "continue". * "foreach": Simplify explanation of ``RANGE`` and ``IN`` signatures; advise against negative arguments or reverse ranges (compare issue #18461) * "endif", "endfunction" etc: Explain that the argument is optional and maintained for compatibility only
This commit is contained in:
committed by
Joachim Wuttke (o)
parent
7053dd301c
commit
c2efb3efcd
@@ -1,11 +1,15 @@
|
||||
cmake_minimum_required
|
||||
----------------------
|
||||
|
||||
Set the minimum required version of cmake for a project and
|
||||
update `Policy Settings`_ to match the version given::
|
||||
Require a minimum version of cmake.
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
cmake_minimum_required(VERSION <min>[...<max>] [FATAL_ERROR])
|
||||
|
||||
Sets the minimum required version of cmake for a project.
|
||||
Also updates the policy settings as explained below.
|
||||
|
||||
``<min>`` and the optional ``<max>`` are each CMake versions of the form
|
||||
``major.minor[.patch[.tweak]]``, and the ``...`` is literal.
|
||||
|
||||
@@ -47,13 +51,17 @@ as of a given CMake version and tells newer CMake versions to warn
|
||||
about their new policies.
|
||||
|
||||
When a ``<min>`` version higher than 2.4 is specified the command
|
||||
implicitly invokes::
|
||||
implicitly invokes
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
cmake_policy(VERSION <min>[...<max>])
|
||||
|
||||
which sets CMake policies based on the range of versions specified.
|
||||
When a ``<min>`` version 2.4 or lower is given the command implicitly
|
||||
invokes::
|
||||
invokes
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
cmake_policy(VERSION 2.4[...<max>])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user