2014-08-03 19:52:23 +02:00
|
|
|
option
|
|
|
|
------
|
|
|
|
|
2019-11-11 23:01:05 +01:00
|
|
|
Provide an option that the user can optionally select.
|
2014-08-03 19:52:23 +02:00
|
|
|
|
2019-11-11 23:01:05 +01:00
|
|
|
.. code-block:: cmake
|
2014-08-03 19:52:23 +02:00
|
|
|
|
2019-11-11 23:01:05 +01:00
|
|
|
option(<variable> "<help_text>" [value])
|
2014-08-03 19:52:23 +02:00
|
|
|
|
2019-11-11 23:01:05 +01:00
|
|
|
Provides an option for the user to select as ``ON`` or ``OFF``.
|
|
|
|
If no initial ``<value>`` is provided, ``OFF`` is used.
|
2020-08-30 11:54:41 +02:00
|
|
|
If ``<variable>`` is already set as a normal or cache variable,
|
2019-11-11 23:01:05 +01:00
|
|
|
then the command does nothing (see policy :policy:`CMP0077`).
|
2014-08-03 19:52:23 +02:00
|
|
|
|
|
|
|
If you have options that depend on the values of other options, see
|
2015-11-17 17:22:37 +01:00
|
|
|
the module help for :module:`CMakeDependentOption`.
|