cmake/Help/command/variable_requires.rst

23 lines
765 B
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
variable_requires
-----------------
2019-11-11 23:01:05 +01:00
Disallowed since version 3.0. See CMake Policy :policy:`CMP0035`.
2014-08-03 19:52:23 +02:00
2015-11-17 17:22:37 +01:00
Use the :command:`if` command instead.
2014-08-03 19:52:23 +02:00
Assert satisfaction of an option's required variables.
::
variable_requires(TEST_VARIABLE RESULT_VARIABLE
REQUIRED_VARIABLE1
REQUIRED_VARIABLE2 ...)
2015-11-17 17:22:37 +01:00
The first argument (``TEST_VARIABLE``) is the name of the variable to be
2014-08-03 19:52:23 +02:00
tested, if that variable is false nothing else is done. If
2015-11-17 17:22:37 +01:00
``TEST_VARIABLE`` is true, then the next argument (``RESULT_VARIABLE``)
is a variable that is set to true if all the required variables are set.
2014-08-03 19:52:23 +02:00
The rest of the arguments are variables that must be true or not set
2019-11-11 23:01:05 +01:00
to ``NOTFOUND`` to avoid an error. If any are not true, an error is
2014-08-03 19:52:23 +02:00
reported.