mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Make sure debug mode uses -O0
This commit is contained in:
parent
2d908acc0a
commit
ef66d9a43a
1 changed files with 6 additions and 3 deletions
|
|
@ -111,6 +111,8 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
|
|||
list(APPEND f90flags -cpp -std=f2008 -fbacktrace -O2)
|
||||
list(APPEND cflags -cpp -std=c99 -O2)
|
||||
if(debug)
|
||||
list(REMOVE_ITEM f90flags -O2)
|
||||
list(REMOVE_ITEM cflags -O2)
|
||||
list(APPEND f90flags -g -Wall -pedantic -fbounds-check
|
||||
-ffpe-trap=invalid,overflow,underflow)
|
||||
list(APPEND cflags -g -Wall -pedantic -fbounds-check)
|
||||
|
|
@ -144,8 +146,8 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
|
|||
list(APPEND cflags -std=c99)
|
||||
if(debug)
|
||||
list(APPEND f90flags -g -warn -ftrapuv -fp-stack-check
|
||||
"-check all" -fpe0)
|
||||
list(APPEND cflags -g -w3 -ftrapuv -fp-stack-check)
|
||||
"-check all" -fpe0 -O0)
|
||||
list(APPEND cflags -g -w3 -ftrapuv -fp-stack-check -O0)
|
||||
list(APPEND ldflags -g)
|
||||
endif()
|
||||
if(profile)
|
||||
|
|
@ -184,7 +186,8 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL XL)
|
|||
list(APPEND f90flags -O2)
|
||||
add_definitions(-DNO_F2008)
|
||||
if(debug)
|
||||
list(APPEND f90flags -g -C -qflag=i:i -u)
|
||||
list(REMOVE_ITEM f90flags -O2)
|
||||
list(APPEND f90flags -g -C -qflag=i:i -u -O0)
|
||||
list(APPEND ldflags -g)
|
||||
endif()
|
||||
if(profile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue