Skip to content

Commit

Permalink
Merge pull request #2295 from GEOS-ESM/hotfix/mathomp4/update-findesmf
Browse files Browse the repository at this point in the history
Update FindESMF.cmake file to match ESMF 8.5.0
  • Loading branch information
mathomp4 authored Aug 3, 2023
2 parents f8d54ac + ca62617 commit d3085a1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

### Fixed

### Removed

### Deprecated

## [2.40.3] - 2023-08-03

### Changed

- Update `components.yaml`
- ESMA_cmake v3.31.1 (Fixes for NAG)

### Fixed

- Undoing previous workaround for NAG + `MAPL_Config.F90` in v2.40.1 which was a workaround was not portable to Linux. Instead, this uses changes in ESMA_cmake v3.31.1 for flags with NAG.

### Removed

### Deprecated
- Updated `FindESMF.cmake` file to match that of ESMF v8.5.0

## [2.40.2] - 2023-08-01

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif ()

project (
MAPL
VERSION 2.40.2
VERSION 2.40.3
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

# Set the possible values of build type for cmake-gui
Expand Down
8 changes: 6 additions & 2 deletions cmake/FindESMF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,17 @@ if(EXISTS ${ESMFMKFILE})
message(WARNING "Static ESMF library (libesmf.a) not found in \
${ESMF_LIBSDIR}. Try setting USE_ESMF_STATIC_LIBS=OFF")
endif()
add_library(ESMF STATIC IMPORTED)
if(NOT TARGET ESMF)
add_library(ESMF STATIC IMPORTED)
endif()
else()
find_library(ESMF_LIBRARY_LOCATION NAMES esmf PATHS ${ESMF_LIBSDIR} NO_DEFAULT_PATH)
if(ESMF_LIBRARY_LOCATION MATCHES "ESMF_LIBRARY_LOCATION-NOTFOUND")
message(WARNING "ESMF library not found in ${ESMF_LIBSDIR}.")
endif()
add_library(ESMF UNKNOWN IMPORTED)
if(NOT TARGET ESMF)
add_library(ESMF UNKNOWN IMPORTED)
endif()
endif()

# Add ESMF include directories
Expand Down

0 comments on commit d3085a1

Please sign in to comment.