Skip to content

Commit

Permalink
Merge pull request #8 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 4aa6b67 + 982b5e8 commit 919a204
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
include("list_of_files.cmake")

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "-g -auto -convert big_endian -assume byterecl -fp-model strict -fpp")
set(CMAKE_Fortran_FLAGS "-g -auto -convert big_endian -assume byterecl -fp-model strict -fpp ${CMAKE_Fortran_FLAGS}")
set(fortran_d_flags "-r8")
set(fortran_8_flags "-i8 -r8")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "-g -fconvert=big-endian -cpp")
set(CMAKE_Fortran_FLAGS "-g -fconvert=big-endian -cpp ${CMAKE_Fortran_FLAGS}")
set(CMAKE_Fortran_FLAGS_DEBUG "-ggdb -Wall")
set(fortran_d_flags "-fdefault-real-8")
set(fortran_8_flags "-fdefault-integer-8 -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(kinds "4" "8" "d")
foreach(kind ${kinds})
set(lib_name ${PROJECT_NAME}_${kind})
Expand Down

0 comments on commit 919a204

Please sign in to comment.