From cc97725137783d4f6be3d513c14b975099319863 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" Date: Thu, 14 Apr 2022 14:27:38 +0200 Subject: Help: document exit code of command cmake(1) --- Help/manual/cmake.1.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 3ef7b3f..cae8798 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -1059,6 +1059,17 @@ To view the presets available for a project, use cmake --list-presets + +.. _`CMake Exit Code`: + +Return Value (Exit Code) +======================== + +Upon regular termination, the **cmake** executable returns the exit code 0. +If termination is caused by the command :command:`message(FATAL_ERROR)`, +then a non-zero exit code is returned. + + See Also ======== -- cgit v0.12 From 0aea13d20bc638ac896d5e0e817c6bd4f20e0770 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" Date: Thu, 14 Apr 2022 14:39:12 +0200 Subject: Help: for message(FATAL_ERROR), document nonzero exit code --- Help/command/message.rst | 3 +++ Help/manual/cmake.1.rst | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Help/command/message.rst b/Help/command/message.rst index e44803e..ca4f5c1 100644 --- a/Help/command/message.rst +++ b/Help/command/message.rst @@ -32,6 +32,9 @@ influences the way the message is handled: ``FATAL_ERROR`` CMake Error, stop processing and generation. + The :manual:`cmake(1)` executable will return a non-zero + :ref:`exit code `. + ``SEND_ERROR`` CMake Error, continue processing, but skip generation. diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index cae8798..5ac21c8 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -1065,9 +1065,10 @@ To view the presets available for a project, use Return Value (Exit Code) ======================== -Upon regular termination, the **cmake** executable returns the exit code 0. +Upon regular termination, the ``cmake`` executable returns the exit code ``0``. + If termination is caused by the command :command:`message(FATAL_ERROR)`, -then a non-zero exit code is returned. +or another error condition, then a non-zero exit code is returned. See Also -- cgit v0.12