CMakeDependentOption: Sync documentation

- Added intro code block with include() showing how to load this module.
- Used "command" instead of "macro".
- Removed duplicate mention of CMakeDependentOption module in the
  option() documentation.
- Synced captions in examples.
This commit is contained in:
Peter Kokot
2025-05-12 21:10:29 +02:00
parent 4802077fb9
commit f70f972562
3 changed files with 19 additions and 14 deletions

View File

@@ -11,14 +11,11 @@ If no initial ``<value>`` is provided, boolean ``OFF`` is the default value.
If ``<variable>`` is already set as a normal or cache variable,
then the command does nothing (see policy :policy:`CMP0077`).
For options that depend on the values of other options, see
the module help for :module:`CMakeDependentOption`.
In CMake project mode, a boolean cache variable is created with the option
value. In CMake script mode, a boolean variable is set with the option value.
See Also
^^^^^^^^
* The :module:`CMakeDependentOption` module to specify dependent boolean options
based on a set of conditions.
* The :module:`CMakeDependentOption` module to specify boolean options that
depend on the values of other options or a set of conditions.