diff options
author | Craig Scott <craig.scott@crascit.com> | 2024-03-19 11:03:58 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2024-03-19 11:37:52 (GMT) |
commit | c980745b8251d108038f7b023fe42f386599b682 (patch) | |
tree | 8c68b44500d26f80814f33b177764da5a3b0a7aa /Help | |
parent | 8a40da1b711db7065e53b50676b3757e9d5f0b1d (diff) | |
download | CMake-c980745b8251d108038f7b023fe42f386599b682.zip CMake-c980745b8251d108038f7b023fe42f386599b682.tar.gz CMake-c980745b8251d108038f7b023fe42f386599b682.tar.bz2 |
Help: Specify advisable range for exit code in cmake_language(EXIT)
The limitations added here are documented in the bash shell's
reference manual.
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/cmake_language.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Help/command/cmake_language.rst b/Help/command/cmake_language.rst index 4944f5c..38d06bb 100644 --- a/Help/command/cmake_language.rst +++ b/Help/command/cmake_language.rst @@ -519,8 +519,13 @@ Terminating Scripts Terminate the current :option:`cmake -P` script and exit with ``<exit-code>``. This command works only in :ref:`script mode <Script Processing Mode>`. + If used outside of that context, it will cause a fatal error. The ``<exit-code>`` should be non-negative. - If ``<exit-code>`` is negative then the behavior + If ``<exit-code>`` is negative, then the behavior is unspecified (e.g., on Windows the error code -1 - becomes ``0xffffffff``, and on Linux it becomes ``255``). + becomes ``0xffffffff``, and on Linux it becomes 255). + Exit codes above 255 may not be supported by the underlying + shell or platform, and some shells may interpret values + above 125 specially. Therefore, it is advisable to only + specify an ``<exit-code>`` in the range 0 to 125. |