1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-18 17:31:57 +08:00

Help: ENVIRONMENT_MODIFICATION: split modification ops

Refactoring the environment modification ops list out of the environment
modification help file.
This commit is contained in:
Evan Wilde
2025-07-10 12:21:43 -07:00
parent 5525104cd0
commit ff21c3f78a
2 changed files with 21 additions and 20 deletions

View File

@@ -0,0 +1,20 @@
- ``reset``: Reset to the unmodified value, ignoring all modifications to
``MYVAR`` prior to this entry. Note that this will reset the variable to
the value set by :prop_test:`ENVIRONMENT`, if it was set, and otherwise
to its state from the rest of the CTest execution.
- ``set``: Replaces the current value of ``MYVAR`` with ``VALUE``.
- ``unset``: Unsets the current value of ``MYVAR``.
- ``string_append``: Appends singular ``VALUE`` to the current value of
``MYVAR``.
- ``string_prepend``: Prepends singular ``VALUE`` to the current value of
``MYVAR``.
- ``path_list_append``: Appends singular ``VALUE`` to the current value of
``MYVAR`` using the host platform's path list separator (``;`` on Windows
and ``:`` elsewhere).
- ``path_list_prepend``: Prepends singular ``VALUE`` to the current value of
``MYVAR`` using the host platform's path list separator (``;`` on Windows
and ``:`` elsewhere).
- ``cmake_list_append``: Appends singular ``VALUE`` to the current value of
``MYVAR`` using ``;`` as the separator.
- ``cmake_list_prepend``: Prepends singular ``VALUE`` to the current value of
``MYVAR`` using ``;`` as the separator.

View File

@@ -13,26 +13,7 @@ where ``MYVAR`` is the case-sensitive name of an environment variable
to be modified. Entries are considered in the order specified in the to be modified. Entries are considered in the order specified in the
property's value. The ``OP`` may be one of: property's value. The ``OP`` may be one of:
- ``reset``: Reset to the unmodified value, ignoring all modifications to .. include:: ../include/ENVIRONMENT_MODIFICATION_OPS.rst
``MYVAR`` prior to this entry. Note that this will reset the variable to
the value set by :prop_test:`ENVIRONMENT`, if it was set, and otherwise
to its state from the rest of the CTest execution.
- ``set``: Replaces the current value of ``MYVAR`` with ``VALUE``.
- ``unset``: Unsets the current value of ``MYVAR``.
- ``string_append``: Appends singular ``VALUE`` to the current value of
``MYVAR``.
- ``string_prepend``: Prepends singular ``VALUE`` to the current value of
``MYVAR``.
- ``path_list_append``: Appends singular ``VALUE`` to the current value of
``MYVAR`` using the host platform's path list separator (``;`` on Windows
and ``:`` elsewhere).
- ``path_list_prepend``: Prepends singular ``VALUE`` to the current value of
``MYVAR`` using the host platform's path list separator (``;`` on Windows
and ``:`` elsewhere).
- ``cmake_list_append``: Appends singular ``VALUE`` to the current value of
``MYVAR`` using ``;`` as the separator.
- ``cmake_list_prepend``: Prepends singular ``VALUE`` to the current value of
``MYVAR`` using ``;`` as the separator.
Unrecognized ``OP`` values will result in the test failing before it is Unrecognized ``OP`` values will result in the test failing before it is
executed. This is so that future operations may be added without changing executed. This is so that future operations may be added without changing