summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-03 15:01:44 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-12-03 15:01:44 (GMT)
commit53fa072e6a63477916f38028c5f5d818c47f6980 (patch)
treea809eb15ba26ee9d2cba53ac96d1efdaa8d0c4a4 /Help
parentcf63779f353ce95434f8dc6926b3047217b78f72 (diff)
parent0de867dde282670461e56ce61e9c33fc6044d9a4 (diff)
downloadCMake-53fa072e6a63477916f38028c5f5d818c47f6980.zip
CMake-53fa072e6a63477916f38028c5f5d818c47f6980.tar.gz
CMake-53fa072e6a63477916f38028c5f5d818c47f6980.tar.bz2
Merge topic 'add-continue-command'
0de867dd continue: Add a new CMake language command for loop continuation (#14013)
Diffstat (limited to 'Help')
-rw-r--r--Help/command/break.rst2
-rw-r--r--Help/command/continue.rst12
-rw-r--r--Help/manual/cmake-commands.7.rst1
-rw-r--r--Help/manual/cmake-language.7.rst6
-rw-r--r--Help/release/dev/add-continue-command.rst6
5 files changed, 25 insertions, 2 deletions
diff --git a/Help/command/break.rst b/Help/command/break.rst
index 8f1067b..fc2cd3c 100644
--- a/Help/command/break.rst
+++ b/Help/command/break.rst
@@ -8,3 +8,5 @@ Break from an enclosing foreach or while loop.
break()
Breaks from an enclosing foreach loop or while loop
+
+See also the :command:`continue` command.
diff --git a/Help/command/continue.rst b/Help/command/continue.rst
new file mode 100644
index 0000000..1c7d673
--- /dev/null
+++ b/Help/command/continue.rst
@@ -0,0 +1,12 @@
+continue
+--------
+
+Continue to the top of enclosing foreach or while loop.
+
+::
+
+ continue()
+
+The ``continue`` command allows a cmake script to abort the rest of a block
+in a :command:`foreach` or :command:`while` loop, and start at the top of
+the next iteration. See also the :command:`break` command.
diff --git a/Help/manual/cmake-commands.7.rst b/Help/manual/cmake-commands.7.rst
index 9c1d3b9..4616dd1 100644
--- a/Help/manual/cmake-commands.7.rst
+++ b/Help/manual/cmake-commands.7.rst
@@ -31,6 +31,7 @@ These commands may be used freely in CMake projects.
/command/cmake_minimum_required
/command/cmake_policy
/command/configure_file
+ /command/continue
/command/create_test_sourcelist
/command/define_property
/command/elseif
diff --git a/Help/manual/cmake-language.7.rst b/Help/manual/cmake-language.7.rst
index 9c511ca..15c101f 100644
--- a/Help/manual/cmake-language.7.rst
+++ b/Help/manual/cmake-language.7.rst
@@ -469,8 +469,10 @@ Loops
The :command:`foreach`/:command:`endforeach` and
:command:`while`/:command:`endwhile` commands delimit code
-blocks to be executed in a loop. The :command:`break` command
-may be used inside such blocks to terminate the loop early.
+blocks to be executed in a loop. Inside such blocks the
+:command:`break` command may be used to terminate the loop
+early whereas the :command:`continue` command may be used
+to start with the next iteration immediately.
Command Definitions
-------------------
diff --git a/Help/release/dev/add-continue-command.rst b/Help/release/dev/add-continue-command.rst
new file mode 100644
index 0000000..4995a8e
--- /dev/null
+++ b/Help/release/dev/add-continue-command.rst
@@ -0,0 +1,6 @@
+add-continue-command
+--------------------
+
+* A new :command:`continue` command was added that can be called inside loop
+ contexts to end the current iteration and start the next one at the top of
+ the loop block.