Skip to content

Commit

Permalink
Merge pull request #16 from GEOS-ESM/bugfix/mathomp4/fms-mom6-debug-c…
Browse files Browse the repository at this point in the history
…make-fix

Change Intel Debug flags for FMS
  • Loading branch information
mathomp4 authored Nov 25, 2020
2 parents 9b91d4d + b48675c commit 838cdd0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@ endif ()

set (CMAKE_Fortran_FLAGS_RELEASE "${GEOS_Fortran_FLAGS_VECT}")

# This 'resets' the Intel DEBUG flags for FMS. The stock debug flags use
# 'all,noarg_temp_created' which seem to be too aggressive for FMS/MOM6. This
# moves them back to the 'bounds,uninit' GEOS used to build with.
if (CMAKE_Fortran_COMPILER_ID MATCHES "Intel" AND CMAKE_BUILD_TYPE MATCHES Debug)
string(REPLACE "all,noarg_temp_created" "bounds,uninit" _tmp "${GEOS_Fortran_FLAGS_DEBUG}")
set (CMAKE_Fortran_FLAGS_DEBUG "${_tmp}")
endif ()

if (CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
target_compile_options (${lib} PRIVATE $<$<COMPILE_LANGUAGE:Fortran>:-kind=byte>)
endif ()
Expand Down

0 comments on commit 838cdd0

Please sign in to comment.