Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
Update optimization controls
Browse files Browse the repository at this point in the history
  • Loading branch information
jchristopherson committed Aug 11, 2020
1 parent c4f7e81 commit 71ca506
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ endif()

if (Fortran_COMPILER_NAME MATCHES "gfortran.*")
# gfortran
set(CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -O3 -Wl,--allow-multiple-definition")
set(CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -O0 -Wl,--allow-multiple-definition")
set (CMAKE_Fortran_FLAGS_DEBUG "-fno-f2c -O0 -g -Wall -Wno-c-binding-type -Wl,--allow-multiple-definition")
elseif (Fortran_COMPILER_NAME MATCHES "ifort.*")
# ifort (untested)
set (CMAKE_Fortran_FLAGS_RELEASE "-f77rtl -O3")
set (CMAKE_Fortran_FLAGS_RELEASE "-f77rtl -O0")
set (CMAKE_Fortran_FLAGS_DEBUG "-f77rtl -O0 -g")
else (Fortran_COMPILER_NAME MATCHES "gfortran.*")
message ("No optimized Fortran compiler flags are known, we just try -O2...")
set (CMAKE_Fortran_FLAGS_RELEASE "-O2 -Wl,--allow-multiple-definition")
set (CMAKE_Fortran_FLAGS_RELEASE "-O0 -Wl,--allow-multiple-definition")
set (CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -Wall -Wl,--allow-multiple-definition")
endif ()
message(STATUS "CMAKE_Fortran_COMPILER full path: " ${CMAKE_Fortran_COMPILER})
Expand Down

0 comments on commit 71ca506

Please sign in to comment.