mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Make -O2 default for gcc.
This commit is contained in:
parent
47deaa8c60
commit
2d908acc0a
1 changed files with 5 additions and 2 deletions
|
|
@ -108,8 +108,8 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
|
|||
endif()
|
||||
|
||||
# GCC compiler options
|
||||
list(APPEND f90flags -cpp -std=f2008 -fbacktrace)
|
||||
list(APPEND cflags -cpp -std=c99)
|
||||
list(APPEND f90flags -cpp -std=f2008 -fbacktrace -O2)
|
||||
list(APPEND cflags -cpp -std=c99 -O2)
|
||||
if(debug)
|
||||
list(APPEND f90flags -g -Wall -pedantic -fbounds-check
|
||||
-ffpe-trap=invalid,overflow,underflow)
|
||||
|
|
@ -122,6 +122,8 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
|
|||
list(APPEND ldflags -pg)
|
||||
endif()
|
||||
if(optimize)
|
||||
list(REMOVE_ITEM f90flags -O2)
|
||||
list(REMOVE_ITEM cflags -O2)
|
||||
list(APPEND f90flags -O3)
|
||||
list(APPEND cflags -O3)
|
||||
endif()
|
||||
|
|
@ -190,6 +192,7 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL XL)
|
|||
list(APPEND ldflags -p)
|
||||
endif()
|
||||
if(optimize)
|
||||
list(REMOVE_ITEM f90flags -O2)
|
||||
list(APPEND f90flags -O3)
|
||||
endif()
|
||||
if(openmp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue