variable_watch.rst 421 B

123456789101112131415
  1. variable_watch
  2. --------------
  3. Watch the CMake variable for change.
  4. .. code-block:: cmake
  5. variable_watch(<variable> [<command>])
  6. If the specified ``<variable>`` changes, a message will be printed
  7. to inform about the change.
  8. Additionally, if ``<command>`` is given, this command will be executed.
  9. The command will receive the following arguments:
  10. ``COMMAND(<variable> <access> <value> <current_list_file> <stack>)``