summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-02-15 13:17:38 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-02-15 13:18:07 (GMT)
commit4802ffbead9b0a58a821a7d5233992c171508a8e (patch)
tree1f8b12e9bf730692f60b940ed1c36df0e5166e80
parentefca640726e2a8febcef19cb82d9e134ca027291 (diff)
parent615ba911c4ecaacb6b16f4b85205779541953d3c (diff)
downloadCMake-4802ffbead9b0a58a821a7d5233992c171508a8e.zip
CMake-4802ffbead9b0a58a821a7d5233992c171508a8e.tar.gz
CMake-4802ffbead9b0a58a821a7d5233992c171508a8e.tar.bz2
Merge topic 'doc'
615ba911c4 Help: cmake(1): sleep can have floating point value 68a46505a3 Help: math: note that floating point inputs are invalid Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8206
-rw-r--r--Help/command/math.rst3
-rw-r--r--Help/manual/cmake.1.rst11
2 files changed, 11 insertions, 3 deletions
diff --git a/Help/command/math.rst b/Help/command/math.rst
index 8386aab..6989ebc 100644
--- a/Help/command/math.rst
+++ b/Help/command/math.rst
@@ -9,7 +9,8 @@ Evaluate a mathematical expression.
Evaluates a mathematical ``<expression>`` and sets ``<variable>`` to the
resulting value. The result of the expression must be representable as a
-64-bit signed integer.
+64-bit signed integer. Floating point inputs are invalid e.g. ``1.1 * 10``.
+Non-integer results e.g. ``3 / 2`` are truncated.
The mathematical expression must be given as a string (i.e. enclosed in
double quotation marks). An example is ``"5 * (10 + 13)"``.
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index e48ecd9..76dc883 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -1080,11 +1080,18 @@ Available commands are:
situations instead. Use ``--`` to stop interpreting options and treat all
remaining arguments as paths, even if they start with ``-``.
-.. option:: sleep <number>...
+.. option:: sleep <number>
.. versionadded:: 3.0
- Sleep for given number of seconds.
+ Sleep for ``<number>`` seconds. ``<number>`` may be a floating point number.
+ A practical minimum is about 0.1 seconds due to overhead in starting/stopping
+ CMake executable. This can be useful in a CMake script to insert a delay:
+
+ .. code-block:: cmake
+
+ # Sleep for about 0.5 seconds
+ execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 0.5)
.. option:: tar [cxt][vf][zjJ] file.tar [<options>] [--] [<pathname>...]