File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -9,19 +9,22 @@ if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
99 # General:
1010 set (CMAKE_Fortran_FLAGS " -fno-range-check -fno-f2c -cpp " ) # remove -g -O2 from main list
1111 execute_process (COMMAND ${CMAKE_Fortran_COMPILER} --version OUTPUT_VARIABLE CMAKE_Fortran_COMPILER_VERSION)
12- string (REGEX MATCH "[3 -9].[0-9].[0-9]" CMAKE_Fortran_COMPILER_VERSION ${CMAKE_Fortran_COMPILER_VERSION} )
12+ string (REGEX MATCH "1?[0 -9].[0-9].[0-9]" CMAKE_Fortran_COMPILER_VERSION ${CMAKE_Fortran_COMPILER_VERSION} )
1313 if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER 4.3.9)
1414 add_definitions (-D_GFORTRAN)
1515 endif ()
16+ if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10.0.0)
17+ set (CMAKE_Fortran_FLAGS "-fallow-invalid-boz ${CMAKE_Fortran_FLAGS} " )
18+ endif ()
1619 # Release flags:
1720 # ON APPLE machines and on 32bit Linux systems, -O2 seems to be the highest optimization level possible
1821 # for file l_complex_taylor.f90
1922 if (APPLE OR IS32BIT)
2023 if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS 4.6)
21- set (CMAKE_Fortran_FLAGS_RELEASE "-O1" )
24+ set (CMAKE_Fortran_FLAGS_RELEASE "-O1 ${CMAKE_Fortran_FLAGS_RELEASE} " )
2225 endif ()
2326 else ()
24- set (CMAKE_Fortran_FLAGS_RELEASE "-O4" )
27+ set (CMAKE_Fortran_FLAGS_RELEASE "-O4 ${CMAKE_Fortran_FLAGS_RELEASE} " )
2528 endif ()
2629 set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-loops ${CMAKE_Fortran_FLAGS_RELEASE} " )
2730
You can’t perform that action at this time.
0 commit comments