Set some additional Fortran flags for debug builds.

This commit is contained in:
Joe Taylor 2021-04-15 13:54:36 -04:00
parent 3c853df1bc
commit 7b007e07f8

View File

@ -956,7 +956,7 @@ if (Fortran_COMPILER_NAME MATCHES "gfortran.*")
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_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fbounds-check -fno-f2c -ffpe-trap=denormal,invalid,zero,overflow ${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}")
elseif (Fortran_COMPILER_NAME MATCHES "ifort.*")
# ifort (untested)
set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -f77rtl ${General_FFLAGS}")