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 19:03:43 (GMT)
committerJoachim Wuttke (o) <j.wuttke@fz-juelich.de>2018-11-06 11:55:24 (GMT)
commit2b2b41f038af97b7bca2213cda0198d2a28f6c2e (patch)
treeae6ef50af5384291ecc4d0ed1c86f851524d7d8a /Help/manual/cmake-generator-expressions.7.rst
parente045fb202ddf9100965ac418f4aa22e65256dd8d (diff)
downloadCMake-2b2b41f038af97b7bca2213cda0198d2a28f6c2e.zip
CMake-2b2b41f038af97b7bca2213cda0198d2a28f6c2e.tar.gz
CMake-2b2b41f038af97b7bca2213cda0198d2a28f6c2e.tar.bz2
Help: Code example for case-insensitive comparison
Diffstat (limited to 'Help/manual/cmake-generator-expressions.7.rst')
-rw-r--r--Help/manual/cmake-generator-expressions.7.rst15
1 files changed, 12 insertions, 3 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index bf11b05..c5d7a31 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -65,7 +65,14 @@ String Comparisons
``$<STREQUAL:string1,string2>``
``1`` if ``string1`` and ``string2`` are equal, else ``0``.
- The comparison is case-sensitive.
+ The comparison is case-sensitive. For a case-insensitive comparison,
+ combine with a :ref:`string transforming generator expression
+ <String Transforming Generator Expressions>`,
+
+ .. code-block:: cmake
+
+ $<STREQUAL:$<UPPER_CASE:${foo}>,"BAR"> # "1" if ${foo} is any of "BAR", "Bar", "bar", ...
+
``$<EQUAL:value1,value2>``
``1`` if ``value1`` and ``value2`` are numerically equal, else ``0``.
``$<IN_LIST:string,list>``
@@ -254,8 +261,10 @@ Typically, the ``condition`` is a :ref:`boolean generator expression
expands to ``DEBUG_MODE`` when the ``Debug`` configuration is used, and
otherwise expands to the empty string.
-String Operations
------------------
+.. _`String Transforming Generator Expressions`:
+
+String Transformations
+----------------------
``$<JOIN:list,string>``
Joins the list with the content of ``string``.