summaryrefslogtreecommitdiffstats
path: root/Help/command/variable_watch.rst
blob: ce69bcfcde1b59a7821786b06aa37f82fb779770 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
variable_watch
--------------

Watch the CMake variable for change.

.. code-block:: cmake

  variable_watch(<variable> [<command>])

If the specified ``<variable>`` changes, a message will be printed
to inform about the change.

Additionally, if ``<command>`` is given, this command will be executed.
The command will receive the following arguments:
``COMMAND(<variable> <access> <value> <current_list_file> <stack>)``