File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,13 @@ get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
5858if (Fortran_COMPILER_NAME MATCHES "gfortran.*" )
5959 # gfortran
6060 # Options: https://gcc.gnu.org/onlinedocs/gfortran/Option-Summary.html
61- set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -O3" )
61+ if (WIN32 AND NOT BUILD_SHARED_LIBS )
62+ # For some reason higher than -O1 results in a segmentation fault on
63+ # Windows 7 and on Windows 10 (64-bit versions)
64+ set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -O1" )
65+ else ()
66+ set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -O3" )
67+ endif ()
6268 set (CMAKE_Fortran_FLAGS_DEBUG "-fno-f2c -O0 -g -Wall -Wno-c-binding-type" )
6369elseif (Fortran_COMPILER_NAME MATCHES "ifort.*" )
6470 # ifort (untested)
You can’t perform that action at this time.
0 commit comments