Просмотр исходного кода

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'.
Joachim Wuttke (h) 7 лет назад
Родитель
Сommit
20b6561e78
1 измененных файлов с 15 добавлено и 8 удалено
  1. 15 8
      Help/manual/cmake-generator-expressions.7.rst

+ 15 - 8
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>``