Skip to content

Commit

Permalink
Merge pull request #2320 from GEOS-ESM/hotfix/mathomp4/fix-mapl-cmake…
Browse files Browse the repository at this point in the history
…-package

Fix MAPL dependencies for MAPL-as-library in CMake
  • Loading branch information
mathomp4 authored Sep 15, 2023
2 parents d3085a1 + 18fc54f commit e407849
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [2.40.4] - 2023-09-14

### Fixed

- Fixed handling of MAPL dependencies for when `find_package(MAPL)` is used

## [2.40.3] - 2023-08-03

### Changed
Expand Down
3 changes: 0 additions & 3 deletions cmake/mapl-import.cmake.in

This file was deleted.

29 changes: 29 additions & 0 deletions mapl-import.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
include(CMakeFindDependencyMacro)

find_dependency(MPI COMPONENTS Fortran REQUIRED)
find_dependency(NetCDF COMPONENTS Fortran REQUIRED)
find_dependency(OpenMP COMPONENTS Fortran REQUIRED)

set(GFTL_FOUND @GFTL_FOUND@)
if(GFTL_FOUND)
find_dependency(GFTL HINTS @GFTL_DIR@)
endif()

set(GFTL_SHARED_FOUND @GFTL_SHARED_FOUND@)
if(GFTL_SHARED_FOUND)
find_dependency(GFTL_SHARED HINTS @GFTL_SHARED_DIR@)
endif()

set(FARGPARSE_FOUND @FARGPARSE_FOUND@)
if(FARGPARSE_FOUND)
find_dependency(FARGPARSE HINTS @FARGPARSE_DIR@)
endif()

set(PFLOGGER_FOUND @PFLOGGER_FOUND@)
if(PFLOGGER_FOUND)
find_dependency(PFLOGGER HINTS @PFLOGGER_DIR@)
endif()

list (APPEND CMAKE_MODULE_PATH @MAPL_FULL_INSTALL_DATA_DIR@/cmake)
include (mapl_create_stub_component)
include (mapl_acg)

0 comments on commit e407849

Please sign in to comment.