1CMP0127
2-------
3
4.. versionadded:: 3.22
5
6:command:`cmake_dependent_option` supports full :ref:`Condition Syntax`.
7
8The ``<depends>`` parameter accepts a :ref:`semicolon-separated list <CMake
9Language Lists>` of conditions.  CMake 3.21 and lower evaluates each
10``condition`` as ``if(${condition})``, which does not properly handle
11conditions with nested paren groups.  CMake 3.22 and above instead prefer
12to evaluate each ``condition`` as ``if(<condition>)``, where ``<condition>``
13is re-parsed as if literally written in a call to :command:`if`.  This
14allows expressions like::
15
16  "A AND (B OR C)"
17
18but requires expressions like::
19
20  "FOO MATCHES (UPPER|lower)"
21
22to be re-written as::
23
24  "FOO MATCHES \"(UPPER|lower)\""
25
26Policy ``CMP0127`` provides compatibility for projects that have not
27been updated to expect the new behavior.
28
29This policy was introduced in CMake version 3.22.  CMake version
30|release| warns when the policy is not set and uses ``OLD`` behavior.
31Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
32explicitly.
33
34.. include:: DEPRECATED.txt
35