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 18:31:22 (GMT)
committerJoachim Wuttke (o) <j.wuttke@fz-juelich.de>2018-11-06 11:55:24 (GMT)
commitfb423b3c49d21df851b1d4a91fddfe94d835155b (patch)
treed677599ce5d3a0393e2f9bf28efeffa1db29543b /Help/manual/cmake-generator-expressions.7.rst
parent867c9c9c0dc2782b2d822557c8dc83c451409b48 (diff)
downloadCMake-fb423b3c49d21df851b1d4a91fddfe94d835155b.zip
CMake-fb423b3c49d21df851b1d4a91fddfe94d835155b.tar.gz
CMake-fb423b3c49d21df851b1d4a91fddfe94d835155b.tar.bz2
Help: sort conditional expressions below string-valued ones.
Makes things yet clearer and simpler. Also correct remnant of "informational expression".
Diffstat (limited to 'Help/manual/cmake-generator-expressions.7.rst')
-rw-r--r--Help/manual/cmake-generator-expressions.7.rst59
1 files changed, 29 insertions, 30 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index 4f2036e..cbeb348 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -30,41 +30,14 @@ deviates from most of the CMake documentation in that it omits angular brackets
``<...>`` around placeholders like ``condition``, ``true_value``, ``string``,
and so on.
-.. _`Conditional Generator Expressions`:
-
-Conditional Generator Expressions
-=================================
-
-Conditional generator 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``.
-
-Typically, the ``condition`` is a
-:ref:`boolean generator expression<Boolean Generator Expressions>`.
-For instance,
-
-.. code-block:: cmake
-
- $<$<CONFIG:Debug>:DEBUG_MODE>
-
-expands to ``DEBUG_MODE`` when the ``Debug`` configuration is used, and
-otherwise expands to the empty string.
-
.. _`Boolean Generator Expressions`:
Boolean Generator Expressions
=============================
Boolean expressions evaluate to either ``0`` or ``1``.
-They are typically used to construct the condition in a
-:ref:`conditional generator expression<Conditional Generator Expressions>`.
+They are typically used to construct the condition in a :ref:`conditional
+generator expression<Conditional Generator Expressions>`.
Available boolean expressions are:
@@ -239,7 +212,7 @@ introduce a helper variable to keep the code readable:
set(prop "$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>") # helper variable
$<$<BOOL:${prop}>:-I$<JOIN:${prop}, -I>>
-Available informational expressions are:
+The following string-valued generator expressions are available:
Escaped Characters
------------------
@@ -253,6 +226,32 @@ String literals to escape the special meaning a character would otherwise have:
``$<SEMICOLON>``
A literal ``;``. Used to prevent list expansion on an argument with ``;``.
+.. _`Conditional Generator Expressions`:
+
+Conditional Expressions
+-----------------------
+
+Conditional generator expressions depend on a boolean condition
+that must be ``0`` or ``1``.
+
+``$<condition:true_string>``
+ Evaluates to ``true_string`` if ``condition`` is ``1``.
+ Otherwise evaluates to the empty string.
+
+``$<IF:condition,true_string,false_string>``
+ Evaluates to ``true_string`` if ``condition`` is ``1``.
+ Otherwise evaluates to ``false_string``.
+
+Typically, the ``condition`` is a :ref:`boolean generator expression
+<Boolean Generator Expressions>`. For instance,
+
+.. code-block:: cmake
+
+ $<$<CONFIG:Debug>:DEBUG_MODE>
+
+expands to ``DEBUG_MODE`` when the ``Debug`` configuration is used, and
+otherwise expands to the empty string.
+
String Operations
-----------------