Skip to content

Commit

Permalink
Merge branch 'develop' into feature/mathomp4/add-jemalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 authored Aug 12, 2024
2 parents 3ac12e4 + 38dd3ed commit 0345a41
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [4.5.0] - 2024-08-12

### Changed

- Add workaround to support OpenMP linking with NAG under CMake

## [4.4.0] - 2024-08-01

### Changed
Expand Down
3 changes: 1 addition & 2 deletions compiler/flags/NAG_Fortran.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set (EXTENDED_SOURCE "-132 -w=x95" )
set (FIXED_SOURCE "-fixed")
set (SUPPRESS_UNUSED_DUMMY "-w=uda")
set (F2018 "-f2018")
set (OPENMP "-not_openmp")
# Add quiet flag
# -quiet Suppress the compiler banner and the summary line, so that only diagnostic messages will appear.
set (QUIET "-quiet")
Expand All @@ -26,7 +25,7 @@ endif ()

# Common Fortran Flags
# --------------------
set (common_Fortran_flags "${F2018} ${MISMATCH} ${OPENMP} ${QUIET}")
set (common_Fortran_flags "${F2018} ${MISMATCH} ${QUIET}")
set (common_Fortran_fpe_flags "")

# GEOS Debug
Expand Down
9 changes: 9 additions & 0 deletions esma.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ include (esma_compiler)

find_package (OpenMP)

# CMake has a bug with NAG and OpenMP:
# https://gitlab.kitware.com/cmake/cmake/-/issues/21280
# so we work around it
if (OpenMP_Fortran_FOUND AND CMAKE_Fortran_COMPILER_ID STREQUAL "NAG")
message(STATUS "NAG Fortran detected, resetting OpenMP flags to avoid CMake bug")
set_property(TARGET OpenMP::OpenMP_Fortran PROPERTY INTERFACE_LINK_LIBRARIES "")
set_property(TARGET OpenMP::OpenMP_Fortran PROPERTY INTERFACE_LINK_OPTIONS "-openmp")
endif()

### Position independent code ###

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down

0 comments on commit 0345a41

Please sign in to comment.