diff --git a/CHANGELOG.md b/CHANGELOG.md index c779a6e..e087770 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,12 +17,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated -## [4.7.0] - 2024-11-05 +## [4.8.0] - 2024-11-05 ### Added - Added new `esma_capture_mepo_status` function (in `esma_support/esma_mepo_status.cmake`) to capture the output of `mepo status --hashes` when `mepo` was used to clone the fixture. It will output this into a file `MEPO_STATUS.rc` which is installed to `${CMAKE_INSTALL_PREFIX}/etc` and can be used to help determine the exact state of the fixture at build time. +## [4.7.0] - 2024-10-10 + +### Changed + +- Support for building GEOSgcm with Spack using MAPL as library + - Update `esma_create_stub_component` to look for `mapl_stub.pl` in `$MAPL_BASE_DIR/etc` (which is a variable defined by ecbuild) + - Update `esma_generate_automatic_code` to look for `mapl_acg.pl` in `$MAPL_BASE_DIR/etc` (which is a variable defined by ecbuild) + - Require CMake 3.18 for features used in above updates +- Update to CircleCI orb v5 + ## [4.6.0] - 2024-09-05 ### Added diff --git a/esma_support/esma_create_stub_component.cmake b/esma_support/esma_create_stub_component.cmake index 2c56e68..ee0d733 100644 --- a/esma_support/esma_create_stub_component.cmake +++ b/esma_support/esma_create_stub_component.cmake @@ -1,9 +1,15 @@ +# find_file REQUIRED requires CMake 3.18 +cmake_minimum_required (VERSION 3.18) + macro (esma_create_stub_component srcs module) list (APPEND ${srcs} ${module}.F90) find_file (stub_generator NAME mapl_stub.pl - PATHS ${MAPL_SOURCE_DIR}/Apps ${esma_etc}/MAPL) + PATHS ${MAPL_BASE_DIR}/etc ${MAPL_SOURCE_DIR}/Apps ${esma_etc}/MAPL + DOC "Path to MAPL stub generator" + REQUIRED + ) add_custom_command ( OUTPUT ${module}.F90 @@ -11,7 +17,7 @@ macro (esma_create_stub_component srcs module) MAIN_DEPENDENCY ${stub_generator} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Making component stub for ${module}Mod in ${module}.F90" - ) + ) add_custom_target(stub_${module} DEPENDS ${module}.F90) endmacro () diff --git a/esma_support/esma_generate_automatic_code.cmake b/esma_support/esma_generate_automatic_code.cmake index 2513663..94b4828 100644 --- a/esma_support/esma_generate_automatic_code.cmake +++ b/esma_support/esma_generate_automatic_code.cmake @@ -1,5 +1,7 @@ # Generate headers and resource files for GOCART components +cmake_minimum_required (VERSION 3.18) + set (acg_flags -v) macro (new_esma_generate_automatic_code @@ -7,7 +9,9 @@ macro (new_esma_generate_automatic_code find_file (generator NAME mapl_acg.pl - PATHS ${MAPL_SOURCE_DIR}/Apps ${esma_etc}/MAPL) + PATHS ${MAPL_BASE_DIR}/etc ${MAPL_SOURCE_DIR}/Apps ${esma_etc}/MAPL + DOC "Path to the perl MAPL ACG generator" + ) add_custom_command ( OUTPUT ${rcs} @@ -59,7 +63,9 @@ macro (esma_generate_gmi_code target type) find_file (generator NAME mapl_acg.pl - PATHS ${MAPL_SOURCE_DIR}/Apps ${esma_etc}/MAPL) + PATHS ${MAPL_BASE_DIR}/etc ${MAPL_SOURCE_DIR}/Apps ${esma_etc}/MAPL + DOC "Path to the perl MAPL ACG generator" + ) add_custom_command ( # TARGET ${this} @@ -85,7 +91,10 @@ macro (esma_generate_automatic_code this name destination flags) find_file (generator NAME mapl_acg.pl - PATHS ${MAPL_SOURCE_DIR}/Apps ${esma_etc}/MAPL) + PATHS ${MAPL_BASE_DIR}/etc ${MAPL_SOURCE_DIR}/Apps ${esma_etc}/MAPL + DOC "Path to the perl MAPL ACG generator" + REQUIRED + ) add_custom_command ( OUTPUT ${name}_ExportSpec___.h ${name}_GetPointer___.h ${name}_History___.rc