• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1variable_requires
2-----------------
3
4Disallowed since version 3.0.  See CMake Policy :policy:`CMP0035`.
5
6Use the :command:`if` command instead.
7
8Assert satisfaction of an option's required variables.
9
10::
11
12  variable_requires(TEST_VARIABLE RESULT_VARIABLE
13                    REQUIRED_VARIABLE1
14                    REQUIRED_VARIABLE2 ...)
15
16The first argument (``TEST_VARIABLE``) is the name of the variable to be
17tested, if that variable is false nothing else is done.  If
18``TEST_VARIABLE`` is true, then the next argument (``RESULT_VARIABLE``)
19is a variable that is set to true if all the required variables are set.
20The rest of the arguments are variables that must be true or not set
21to ``NOTFOUND`` to avoid an error.  If any are not true, an error is
22reported.
23