Skip to content

Commit

Permalink
Merge pull request #43 from GEOS-ESM/bugfix/mathomp4/fix-precision-ha…
Browse files Browse the repository at this point in the history
…ndling-cmake

Fix issue with FV_PRECISION and FMS
  • Loading branch information
mathomp4 authored Aug 22, 2022
2 parents 5ee42d8 + 8fc8357 commit 002ac7e
Show file tree
Hide file tree
Showing 3 changed files with 16 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

## [1.8.1] - 2022-08-22

### Fixed

- Fix handling of `FV_PRECISION` in CMake

## [1.8.0] - 2022-08-05

### Changed
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_policy (SET CMP0054 NEW)

project (
GEOSfvdycore
VERSION 1.8.0
VERSION 1.8.1
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

if ("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
Expand All @@ -28,7 +28,7 @@ set (ACG_FLAGS -v)

# This flag at R4 means that FV3 is compiled at R4 and *linked* to
# FMS built at R4.
set (FV_PRECISION "R4" CACHE STRING "Precision of FV3 core (R4, R4R8, R8)")
set (FV_PRECISION "R4" CACHE STRING "Precision of FV3 core (R4, R8)")

# mepo can now clone subrepos in three styles
foreach (dir cmake @cmake cmake@)
Expand Down
9 changes: 8 additions & 1 deletion src/Shared/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@ esma_add_subdirectories (
GMAO_Shared
)

esma_add_subdirectory (FMS RENAME fms_r4)
if (FV_PRECISION STREQUAL R4)
esma_add_subdirectory (FMS RENAME fms_r4)
elseif (FV_PRECISION STREQUAL R8)
esma_add_subdirectory (FMS RENAME fms_r8)
elseif (FV_PRECISION STREQUAL R4R8)
esma_add_subdirectory (FMS RENAME fms_r4)
esma_add_subdirectory (FMS RENAME fms_r8)
endif ()

0 comments on commit 002ac7e

Please sign in to comment.