diff options
author | Martin Duffy <martin.duffy@kitware.com> | 2023-09-11 13:36:12 (GMT) |
---|---|---|
committer | Martin Duffy <martin.duffy@kitware.com> | 2023-09-13 22:01:14 (GMT) |
commit | 634079b86d56e4d53240a52d80a2d3ba985ffb5f (patch) | |
tree | 790e931efd1dc5dd965bcea6309d4750250ff2a6 /Help/manual | |
parent | 49e2a4a0a734f0e42e2d5717ab7c4bf4210af635 (diff) | |
download | CMake-634079b86d56e4d53240a52d80a2d3ba985ffb5f.zip CMake-634079b86d56e4d53240a52d80a2d3ba985ffb5f.tar.gz CMake-634079b86d56e4d53240a52d80a2d3ba985ffb5f.tar.bz2 |
cmGeneratorExpressionEvaluator: Short-circuit boolean operators
Diffstat (limited to 'Help/manual')
-rw-r--r-- | Help/manual/cmake-generator-expressions.7.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst index 8c3f2d7..022ffcc 100644 --- a/Help/manual/cmake-generator-expressions.7.rst +++ b/Help/manual/cmake-generator-expressions.7.rst @@ -195,6 +195,12 @@ Two forms of conditional generator expressions are supported: if ``condition`` is ``0``. Any other value for ``condition`` results in an error. + .. versionadded:: 3.28 + + This generator expression short-circuits such that generator expressions in + ``false_string`` will not evaluate when ``condition`` is ``1``, and generator + expressions in ``true_string`` will not evaluate when condition is ``0``. + Typically, the ``condition`` is itself a generator expression. For instance, the following expression expands to ``DEBUG_MODE`` when the ``Debug`` configuration is used, and the empty string for all other configurations: @@ -252,6 +258,11 @@ The common boolean logic operators are supported: ``condition`` must be ``0`` or ``1``. The result of the expression is ``0`` if ``condition`` is ``1``, else ``1``. + .. versionadded:: 3.28 + + Logical operators short-circuit such that generator expressions in the + arguments list will not be evaluated once a return value can be determined. + .. _`Comparison Expressions`: Primary Comparison Expressions |