summaryrefslogtreecommitdiffstats
path: root/Help/manual/cmake-generator-expressions.7.rst
diff options
context:
space:
mode:
authorJoachim Wuttke (h) <j.wuttke@fz-juelich.de>2018-11-04 14:23:00 (GMT)
committerJoachim Wuttke (o) <j.wuttke@fz-juelich.de>2018-11-06 11:55:23 (GMT)
commit20b6561e78f5acceecae7c6fc330f7f7de4f2223 (patch)
tree357e907f944eb96d6f01d2092fed3a32c741a187 /Help/manual/cmake-generator-expressions.7.rst
parent873e59c0c456c2e13e66019c15f3632d06dac0f6 (diff)
downloadCMake-20b6561e78f5acceecae7c6fc330f7f7de4f2223.zip
CMake-20b6561e78f5acceecae7c6fc330f7f7de4f2223.tar.gz
CMake-20b6561e78f5acceecae7c6fc330f7f7de4f2223.tar.bz2
Help: new section on conditional generator expressions
Before, the closely related signatures $<condition:true_value> $<IF:condition,true_value,false_value> were explained in two different sections. The former section was badly explained, with '0' and '1' in place of the formal parameter 'condition'.
Diffstat (limited to 'Help/manual/cmake-generator-expressions.7.rst')
-rw-r--r--Help/manual/cmake-generator-expressions.7.rst23
1 files changed, 15 insertions, 8 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index 6f17812..094bfc1 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -25,6 +25,21 @@ conditional include directories, and more. The conditions may be based on
the build configuration, target properties, platform information or any other
queryable information.
+Conditional Expressions
+=======================
+
+Conditional expressions depend on a boolean condition that must be
+``0`` or ``1``.
+
+``$<condition:true_value>``
+ Evaluates to ``true_value`` if ``condition`` is ``1``.
+ Otherwise evaluates to the empty string.
+
+``$<IF:condition,true_value,false_value>``
+ Evaluates to ``true_value`` if ``condition`` is ``1``.
+ Otherwise evaluates to ``false_value``.
+
+
Logical Expressions
===================
@@ -58,10 +73,6 @@ Available logical expressions are:
``$<NOT:condition>``
``0`` if ``condition`` is ``1``, else ``1``
-``$<IF:condition,true_value,false_value>``
- ``true_value`` if ``condition`` is ``1``,
- ``false_value`` if ``condition`` is ``0``
-
``$<STREQUAL:a,b>``
``1`` if ``a`` is STREQUAL ``b``, else ``0``
``$<EQUAL:a,b>``
@@ -289,10 +300,6 @@ where ``${prop}`` refers to a helper variable:
Available output expressions are:
-``$<0:...>``
- Empty string (ignores ``...``)
-``$<1:...>``
- Content of ``...``
``$<JOIN:list,...>``
Joins the list with the content of ``...``
``$<ANGLE-R>``