mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 12:19:54 -05:00
Merge topic 'FeatureSummary-condition-syntax'
6a7d5e414d FeatureSummary: Introduce policy CMP0183 for full Condition Syntax
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10031
This commit is contained in:
@@ -57,6 +57,7 @@ Policies Introduced by CMake 3.32
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
CMP0183: add_feature_info() supports full Condition Syntax. </policy/CMP0183>
|
||||
CMP0182: Create shared library archives by default on AIX. </policy/CMP0182>
|
||||
CMP0181: Link command-line fragment variables are parsed and re-quoted. </policy/CMP0181>
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
CMP0183
|
||||
-------
|
||||
|
||||
.. versionadded:: 3.32
|
||||
|
||||
:command:`add_feature_info` supports full :ref:`Condition Syntax`.
|
||||
|
||||
The ``<enabled>`` parameter accepts a :ref:`semicolon-separated list <CMake
|
||||
Language Lists>` of conditions. CMake 3.31 and lower evaluate each
|
||||
``condition`` as ``if(${condition})``, which does not properly handle
|
||||
conditions with nested paren groups. CMake 3.32 and above instead prefer
|
||||
to evaluate each ``condition`` as ``if(<condition>)``, where ``<condition>``
|
||||
is re-parsed as if literally written in a call to :command:`if`. This
|
||||
allows expressions like::
|
||||
|
||||
"A AND (B OR C)"
|
||||
|
||||
but requires expressions like::
|
||||
|
||||
"FOO MATCHES (UPPER|lower)"
|
||||
|
||||
to be re-written as::
|
||||
|
||||
"FOO MATCHES \"(UPPER|lower)\""
|
||||
|
||||
Policy ``CMP0183`` provides compatibility for projects that have not
|
||||
been updated to expect the new behavior.
|
||||
|
||||
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.32
|
||||
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
|
||||
.. include:: STANDARD_ADVICE.txt
|
||||
|
||||
.. include:: DEPRECATED.txt
|
||||
@@ -0,0 +1,6 @@
|
||||
add_feature_info
|
||||
----------------
|
||||
|
||||
* The :module:`FeatureSummary` module :command:`add_feature_info`
|
||||
command now supports full :ref:`Condition Syntax`.
|
||||
See policy :policy:`CMP0183`.
|
||||
Reference in New Issue
Block a user