summaryrefslogtreecommitdiff
path: root/Modules/CheckFortranSourceCompiles.cmake
diff options
context:
space:
mode:
authorscivision <scivision@users.noreply.github.com>2023-02-04 20:25:58 -0500
committerBrad King <brad.king@kitware.com>2023-02-06 09:55:23 -0500
commitb19036d8b38aaebd892ef8bff1fe5eb0a37fc6a3 (patch)
treeffc97617a0eacf5b1ea285efa17e79f576ce7b0e /Modules/CheckFortranSourceCompiles.cmake
parent2a0c105cf08190284b288057c693eeddef5066fc (diff)
downloadcmake-b19036d8b38aaebd892ef8bff1fe5eb0a37fc6a3.tar.gz
Help: CheckSource{Compiles,Runs}: fix typo and clarify
Diffstat (limited to 'Modules/CheckFortranSourceCompiles.cmake')
-rw-r--r--Modules/CheckFortranSourceCompiles.cmake12
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake
index e1343293b7..8dcc1d54a5 100644
--- a/Modules/CheckFortranSourceCompiles.cmake
+++ b/Modules/CheckFortranSourceCompiles.cmake
@@ -19,18 +19,22 @@ Check if given Fortran source compiles and links into an executable.
)
Checks that the source supplied in ``<code>`` can be compiled as a Fortran
- source file and linked as an executable. The ``<code>`` must be a Fortran program
- containing at least an ``end`` statement--for example:
+ source file and linked as an executable. The ``<code>`` must be a Fortran
+ ``program``.
.. code-block:: cmake
- check_fortran_source_compiles("character :: b; error stop b; end" F2018ESTOPOK SRC_EXT F90)
+ check_fortran_source_compiles("program test
+ error stop
+ end program"
+ HAVE_ERROR_STOP
+ SRC_EXT .F90)
This command can help avoid costly build processes when a compiler lacks support
for a necessary feature, or a particular vendor library is not compatible with
the Fortran compiler version being used. This generate-time check may advise the
user of such before the main build process. See also the
- :command:`check_fortran_source_runs` command to actually run the compiled code.
+ :command:`check_fortran_source_runs` command to run the compiled code.
The result will be stored in the internal cache
variable ``<resultVar>``, with a boolean true value for success and boolean