Disable Debug configuration FPE traps in Fortran programs for now

This commit is contained in:
Bill Somerville 2021-04-20 14:15:09 +01:00
parent e32d9e1d28
commit dfdabffc82
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -959,7 +959,11 @@ if (Fortran_COMPILER_NAME MATCHES "gfortran.*")
endif (CMAKE_OSX_SYSROOT) endif (CMAKE_OSX_SYSROOT)
set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fbounds-check -funroll-all-loops -fno-f2c ${General_FFLAGS}") set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fbounds-check -funroll-all-loops -fno-f2c ${General_FFLAGS}")
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -g -fbacktrace -fbounds-check -fno-f2c -ffpe-trap=denormal,invalid,zero,overflow,underflow ${General_FFLAGS}") set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -g -fbacktrace -fbounds-check -fno-f2c ${General_FFLAGS}")
# FPE traps currently disabled in Debug configuration builds until
# we decide if they are meaningful, without these FP instructions
# run in nonstop mode and do not trap
#set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} ${CMAKE_Fortran_FLAGS_DEBUG} -ffpe-trap=invalid,zero,overflow")
elseif (Fortran_COMPILER_NAME MATCHES "ifort.*") elseif (Fortran_COMPILER_NAME MATCHES "ifort.*")
# ifort (untested) # ifort (untested)
set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -f77rtl ${General_FFLAGS}") set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -f77rtl ${General_FFLAGS}")