v4: Fix FMS Yaml detection, add color message and sync data
This release of ESMA_cmake has some useful updates:
1. Build-Time S3 Data Sync (esma_sync_data)
- Added
esma_sync_data()and helper script to run S3 synchronization tasks at build time instead of configure time.
2. Colored Console Logs (color_message)
- Added a new
color_message()utility supporting common terminal colors (RED, GREEN, YELLOW, ORANGE, etc.). - Simplified F2PY compiler mismatch warning outputs to a once-only, highly visible orange status message.
3. Automatic FMS YAML Probe
- Added compiler probe (
check_fms_yaml_support.cmake/test_fms_yaml.f90) to dynamically check if the FMS library was built with YAML support. Automatically finds and linkslibyamlif supported, deprecating the legacyFindlibyaml.cmakemodule.
From CHANGELOG.md
Added
- Added new
esma_color_message.cmakewhich adds acolor_messagefunction - Added
check_fms_yaml_supportmacro (external_libraries/check_fms_yaml_support.cmake+external_libraries/test_fms_yaml.f90) to autodetect whether FMS was built with YAML support via atry_compileprobe, replacing the manualFMS_BUILT_WITH_YAMLoption. Note: once we move to FMS 2026.01 (NOAA-GFDL/FMS#1822), FMS will export libyaml as a properfind_dependencyand this probe (along withFindlibyaml.cmake) can be removed. - Added
esma_sync_data()CMake macro and build-time helper script to support build-time synchronization of data from AWS S3 buckets using temporary AWS credentials.
Changed
- Update
FindF2PY.cmakeandFindF2PY3.cmaketo usecolor_messageinstead of amessage(WARNING)(as with Spack we would always trigger the warning) - Suppress duplicate f2py/Python executable mismatch warnings when
find_packageis called multiple times in the same configure run, using a global-property once-only guard.
What's Changed
- v4: Add esma_sync_data CMake macro and script by @mathomp4 in #549
- v4: Add color_message function and autodetect FMS YAML support by @mathomp4 in #548
Full Changelog: v4.39.0...v4.40.0