Skip to content

Commit

Permalink
Merge pull request #14 from NOAA-EMC/gcc-10-settable-flags
Browse files Browse the repository at this point in the history
GCC 10 and settable flags
  • Loading branch information
aerorahul authored Aug 27, 2020
2 parents 4daa6c0 + 5ff198f commit 76ac3b7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "-g -ip -FR -fp-model strict")
set(CMAKE_Fortran_FLAGS "-g -ip -FR -fp-model strict ${CMAKE_Fortran_FLAGS}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
set(fortran_d_flags "-r8")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$")
set(CMAKE_Fortran_FLAGS "-g -ffree-form")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "-g -ffree-form ${CMAKE_Fortran_FLAGS}")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
set(CMAKE_Fortran_FLAGS_DEBUG "-ggdb -Wall")
set(fortran_d_flags "-fdefault-real-8")
endif()

if(${CMAKE_Fortran_COMPILER_ID} MATCHES "^(GNU)$" AND ${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -w -fallow-argument-mismatch -fallow-invalid-boz")
endif()

set(fortran_src consts.f interp_utils.f ll2xy_utils.f
read_write_utils.f soil_utils.f)

Expand Down

0 comments on commit 76ac3b7

Please sign in to comment.