https://github.com/Kitware/CMake
Raw File
Tip revision: ddeabf05d80db0758708ec502a68def11b4f9591 authored by Brad King on 04 October 2017, 11:44:08 UTC
CMake 3.9.4
Tip revision: ddeabf0
while.rst
while
-----

Evaluate a group of commands while a condition is true

::

  while(condition)
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  endwhile(condition)

All commands between while and the matching :command:`endwhile` are recorded
without being invoked.  Once the :command:`endwhile` is evaluated, the
recorded list of commands is invoked as long as the condition is true.  The
condition is evaluated using the same logic as the :command:`if` command.
back to top