From 56e15d880369af911ca8100a227bbe35191540b2 Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Sat, 5 Dec 2020 13:14:07 +0100 Subject: [PATCH] Improve check for F18 error stop - ifort 21.1 BETA 20200827 compiles F18 error stop syntax but does not propagate the error code correctly --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6143b5ab5..989b40c6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ endif() # --- compiler feature checks include(CheckFortranSourceCompiles) include(CheckFortranSourceRuns) -check_fortran_source_compiles("error stop i; end" f18errorstop SRC_EXT f90) +check_fortran_source_runs("i=0; error stop i; end" f18errorstop SRC_EXT f90) check_fortran_source_compiles("real, allocatable :: array(:, :, :, :, :, :, :, :, :, :); end" f03rank SRC_EXT f90) check_fortran_source_runs("use, intrinsic :: iso_fortran_env, only : real128; real(real128) :: x; x = x+1; end" f03real128)