Skip to content

Commit

Permalink
Merge pull request #47 from ioanhadade/cray_comp_flags
Browse files Browse the repository at this point in the history
Add default compiler flags for Cray
  • Loading branch information
awnawab authored Dec 18, 2024
2 parents 8570ae8 + 2340719 commit 3e60dd0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/ecwam_compile_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
set(checkbounds_flags "-Rb")
set(fpe_flags "-Ktrap=fp")
set(initsnan_flags "-ei")
set(threading_flags "-Othread1")
set(fpmodel_flags "-hfp1 -hflex_mp=conservative -hadd_paren")
set(baseline_flags "-ram -emf")

elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(autopromote_flags "-fdefault-real-8 -fdefault-double-8")
Expand Down Expand Up @@ -68,6 +71,12 @@ endif()
if( DEFINED heap_arrays_flags )
ecbuild_add_fortran_flags( "${heap_arrays_flags}" NAME heap_arrays )
endif()
if( DEFINED baseline_flags)
ecbuild_add_fortran_flags( "${baseline_flags}" NAME baseline_flags )
endif()
if( DEFINED threading_flags)
ecbuild_add_fortran_flags( "${threading_flags}" NAME threading_flags )
endif()

if( CMAKE_BUILD_TYPE MATCHES "Debug" )
foreach( debug_flag fpe initsnan checkbounds )
Expand Down

0 comments on commit 3e60dd0

Please sign in to comment.