Skip to content

Commit 54a386f

Browse files
committed
Add better stacktraces and profiling with gfortran
1 parent 0d58f6e commit 54a386f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ LIBOUT='libjsonfortran.a' # name of json library
8787
INTELCOMPILERFLAGS='-c -O2 -warn -stand f08 -diag-disable 7601 -diag-disable 4013 -diag-disable 5142 -traceback'
8888
#INTELCOMPILERFLAGS='-c -O2 -warn -traceback -stand f08 -assume protect_parens -assume buffered_io -check all'
8989

90-
GNUCOMPILERFLAGS='-c -O2 -fbacktrace -Wall -Wextra -Wno-maybe-uninitialized -Wno-unused-function -pedantic -std=f2008'
90+
GNUCOMPILERFLAGS='-c -O2 -fbacktrace -Wall -Wextra -Wno-maybe-uninitialized -Wno-unused-function -pedantic -std=f2008 -fno-omit-frame-pointer'
9191

9292
FCOMPILER='gnu' #Set default compiler to gfortran
9393

Diff for: cmake/pickFortranCompilerFlags.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ if ( NOT Fortran_FLAGS_INIT )
2828
set ( CMAKE_Fortran_FLAGS_COVERAGE "-fprofile-arcs -ftest-coverage -O0" CACHE STRING
2929
"Fortran compiler flags for coverage configuration" )
3030
if ( ENABLE_BACK_TRACE )
31-
set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbacktrace" )
31+
set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbacktrace -fno-omit-frame-pointer" )
3232
endif ()
3333
if ( ENABLE_COMPILETIME_CHECKS )
3434
set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall -Wextra -Wno-maybe-uninitialized -pedantic -std=f2008" )
3535
endif ()
3636
if ( ENABLE_RUNTIME_CHECKS )
37-
set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fcheck=all" )
37+
set ( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fcheck=all -fno-omit-frame-pointer" )
3838
endif ()
3939
endif ()
4040
endif ()

0 commit comments

Comments
 (0)