mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 11:22:21 -06:00
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
17 lines
495 B
ReStructuredText
17 lines
495 B
ReStructuredText
option
|
|
------
|
|
|
|
Provide an option that the user can optionally select.
|
|
|
|
.. code-block:: cmake
|
|
|
|
option(<variable> "<help_text>" [value])
|
|
|
|
Provides an option for the user to select as ``ON`` or ``OFF``.
|
|
If no initial ``<value>`` is provided, ``OFF`` is used.
|
|
If ``<variable>`` is already set as a normal variable
|
|
then the command does nothing (see policy :policy:`CMP0077`).
|
|
|
|
If you have options that depend on the values of other options, see
|
|
the module help for :module:`CMakeDependentOption`.
|