Commit 9cc6befe authored by Craig Scott's avatar Craig Scott
Browse files

Help: Improve formatting of list(TRANSFORM) sub-options

parent 074fbdb7
......@@ -223,41 +223,41 @@ The actions have exactly the same semantics as sub-commands of the
``APPEND``, ``PREPEND``: Append, prepend specified value to each element of
the list.
.. code-block:: cmake
.. code-block:: cmake
list(TRANSFORM <list> <APPEND|PREPEND> <value> ...)
list(TRANSFORM <list> <APPEND|PREPEND> <value> ...)
``TOUPPER``, ``TOLOWER``: Convert each element of the list to upper, lower
characters.
.. code-block:: cmake
.. code-block:: cmake
list(TRANSFORM <list> <TOLOWER|TOUPPER> ...)
list(TRANSFORM <list> <TOLOWER|TOUPPER> ...)
``STRIP``: Remove leading and trailing spaces from each element of the
list.
.. code-block:: cmake
.. code-block:: cmake
list(TRANSFORM <list> STRIP ...)
list(TRANSFORM <list> STRIP ...)
``GENEX_STRIP``: Strip any
:manual:`generator expressions <cmake-generator-expressions(7)>` from each
element of the list.
.. code-block:: cmake
.. code-block:: cmake
list(TRANSFORM <list> GENEX_STRIP ...)
list(TRANSFORM <list> GENEX_STRIP ...)
``REPLACE``: Match the regular expression as many times as possible and
substitute the replacement expression for the match for each element
of the list
(Same semantic as ``REGEX REPLACE`` from :command:`string` command).
.. code-block:: cmake
.. code-block:: cmake
list(TRANSFORM <list> REPLACE <regular_expression>
<replace_expression> ...)
list(TRANSFORM <list> REPLACE <regular_expression>
<replace_expression> ...)
``<SELECTOR>`` determines which elements of the list will be transformed.
Only one type of selector can be specified at a time. When given,
......@@ -265,23 +265,23 @@ Only one type of selector can be specified at a time. When given,
``AT``: Specify a list of indexes.
.. code-block:: cmake
.. code-block:: cmake
list(TRANSFORM <list> <ACTION> AT <index> [<index> ...] ...)
list(TRANSFORM <list> <ACTION> AT <index> [<index> ...] ...)
``FOR``: Specify a range with, optionally, an increment used to iterate over
the range.
.. code-block:: cmake
.. code-block:: cmake
list(TRANSFORM <list> <ACTION> FOR <start> <stop> [<step>] ...)
list(TRANSFORM <list> <ACTION> FOR <start> <stop> [<step>] ...)
``REGEX``: Specify a regular expression. Only elements matching the regular
expression will be transformed.
.. code-block:: cmake
.. code-block:: cmake
list(TRANSFORM <list> <ACTION> REGEX <regular_expression> ...)
list(TRANSFORM <list> <ACTION> REGEX <regular_expression> ...)
Ordering
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment