From 94b6f8bf4a33057b68319bc2eb2cb81eccd8ccb3 Mon Sep 17 00:00:00 2001 From: scivision Date: Wed, 27 Nov 2024 18:59:08 -0500 Subject: [PATCH] Help: Check*Runs requires exit code 0 for success Explicitly state this requirement to avoid ambiguity in what is 'success' of a program. --- Modules/CheckCSourceRuns.cmake | 6 +++--- Modules/CheckCXXSourceRuns.cmake | 6 +++--- Modules/CheckFortranSourceRuns.cmake | 6 +++--- Modules/CheckOBJCSourceRuns.cmake | 6 +++--- Modules/CheckOBJCXXSourceRuns.cmake | 6 +++--- Modules/CheckSourceRuns.cmake | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake index 4559215c1e..5edfe378ec 100644 --- a/Modules/CheckCSourceRuns.cmake +++ b/Modules/CheckCSourceRuns.cmake @@ -19,9 +19,9 @@ subsequently be run. function. The result is stored in the internal cache variable specified by - ````. Success of build and run is indicated by boolean ``true``. - Failure to build or run is indicated by boolean ``false`` such as an empty - string or an error message. + ````. If the code builds and runs with exit code ``0``, success is + indicated by boolean ``true``. Failure to build or run is indicated by boolean + ``false``, such as an empty string or an error message. See also :command:`check_source_runs` for a more general command syntax. diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake index f0a5ffcdd0..4565a68888 100644 --- a/Modules/CheckCXXSourceRuns.cmake +++ b/Modules/CheckCXXSourceRuns.cmake @@ -19,9 +19,9 @@ subsequently be run. function. The result is stored in the internal cache variable specified by - ````. Success of build and run is indicated by boolean ``true``. - Failure to build or run is indicated by boolean ``false`` such as an empty - string or an error message. + ````. If the code builds and runs with exit code ``0``, success is + indicated by boolean ``true``. Failure to build or run is indicated by boolean + ``false``, such as an empty string or an error message. See also :command:`check_source_runs` for a more general command syntax. diff --git a/Modules/CheckFortranSourceRuns.cmake b/Modules/CheckFortranSourceRuns.cmake index 808baf6cb9..5464b7ca9b 100644 --- a/Modules/CheckFortranSourceRuns.cmake +++ b/Modules/CheckFortranSourceRuns.cmake @@ -21,9 +21,9 @@ subsequently be run. executable, and then run. The ```` must contain a Fortran ``program``. The result is stored in the internal cache variable specified by - ````. Success of build and run is indicated by boolean ``true``. - Failure to build or run is indicated by boolean ``false`` such as an empty - string or an error message. + ````. If the code builds and runs with exit code ``0``, success is + indicated by boolean ``true``. Failure to build or run is indicated by boolean + ``false``, such as an empty string or an error message. .. code-block:: cmake diff --git a/Modules/CheckOBJCSourceRuns.cmake b/Modules/CheckOBJCSourceRuns.cmake index 0611d67446..ac661f5d5c 100644 --- a/Modules/CheckOBJCSourceRuns.cmake +++ b/Modules/CheckOBJCSourceRuns.cmake @@ -21,9 +21,9 @@ can subsequently be run. function. The result is stored in the internal cache variable specified by - ````. Success of build and run is indicated by boolean ``true``. - Failure to build or run is indicated by boolean ``false`` such as an empty - string or an error message. + ````. If the code builds and runs with exit code ``0``, success is + indicated by boolean ``true``. Failure to build or run is indicated by boolean + ``false``, such as an empty string or an error message. See also :command:`check_source_runs` for a more general command syntax. diff --git a/Modules/CheckOBJCXXSourceRuns.cmake b/Modules/CheckOBJCXXSourceRuns.cmake index 1192ff3ce9..8eac3ea54b 100644 --- a/Modules/CheckOBJCXXSourceRuns.cmake +++ b/Modules/CheckOBJCXXSourceRuns.cmake @@ -21,9 +21,9 @@ and can subsequently be run. function. The result is stored in the internal cache variable specified by - ````. Success of build and run is indicated by boolean ``true``. - Failure to build or run is indicated by boolean ``false`` such as an empty - string or an error message. + ````. If the code builds and runs with exit code ``0``, success is + indicated by boolean ``true``. Failure to build or run is indicated by boolean + ``false``, such as an empty string or an error message. See also :command:`check_source_runs` for a more general command syntax. diff --git a/Modules/CheckSourceRuns.cmake b/Modules/CheckSourceRuns.cmake index a0ddfee54d..52e7c7b7d3 100644 --- a/Modules/CheckSourceRuns.cmake +++ b/Modules/CheckSourceRuns.cmake @@ -23,9 +23,9 @@ subsequently be run. a ``main()`` function, or in Fortran a ``program``. The result is stored in the internal cache variable specified by - ````. Success of build and run is indicated by boolean ``true``. - Failure to build or run is indicated by boolean ``false`` such as an empty - string or an error message. + ````. If the code builds and runs with exit code ``0``, success is + indicated by boolean ``true``. Failure to build or run is indicated by boolean + ``false``, such as an empty string or an error message. By default, the test source file will be given a file extension that matches the requested language. The ``SRC_EXT`` option can be used to override this