option.rst 510 B

1234567891011121314151617
  1. option
  2. ------
  3. Provides an option that the user can optionally select.
  4. ::
  5. option(<option_variable> "help string describing option"
  6. [initial value])
  7. Provide an option for the user to select as ``ON`` or ``OFF``. If no
  8. initial value is provided, ``OFF`` is used. If the option is already
  9. set as a normal variable then the command does nothing
  10. (see policy :policy:`CMP0077`).
  11. If you have options that depend on the values of other options, see
  12. the module help for :module:`CMakeDependentOption`.