Skip to content

Commit

Permalink
Modify the "-check all" compiler option for intelLLVM as
Browse files Browse the repository at this point in the history
on Hera it caused a compilation error when choosing
'debug' mode.

Fixes ufs-community#879.
  • Loading branch information
GeorgeGayno-NOAA committed Oct 31, 2024
1 parent adf1650 commit f1532e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model precise")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -check all -ftrapuv")
# On some machines (Hera), using -check all results in an error
# at the linking step. The uninit check is the culprit.
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(IntelLLVM)$")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -check nouninit")
endif()
if(APPLE)
# The linker on macOS does not include `common symbols` by default.
# Passing the -c flag includes them and fixes an error with undefined symbols.
Expand Down

0 comments on commit f1532e5

Please sign in to comment.