You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change finishes the CMake install parity work so downstream consumers (e.g., Mule) get the same critical install artifacts expected from the legacy build flow.
Added installation of standalone shared libraries for key subcomponents:
libshum_constants.so
libshum_string_conv.so
libshum_wgdos_packing.so
libshum_byteswap.so
libshum_spiral_search.so
Added installation of missing public headers:
shumlib_version.h
c_shum_wgdos_packing_version.h
Optionally, added generation of the WGDOS version compatibility header from a template, and ensured it defines SHUMLIB_VERSION for external consumers before including shumlib_version.h.
Added install-time symlink creation so the install prefix contains:
lib64 directory for libraries
lib symlink pointing to lib64
Fixed source/include path handling for new sub-library CMake targets to use project-root-qualified paths, preventing missing-source errors during configure/build.
This keeps the existing aggregate library behaviour while adding/installing the required standalone targets and compatibility headers needed by downstream users.
I'll add an example wrapper script in MetOffice/mule in a separate Mule PR.
Checks
Configure/build/install succeeds with CMake.
Install tree contains the expected five shared libraries in lib64.
Install tree contains the expected headers in include.
Prefix contains lib symlink to lib64.
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
I have performed a self-review of my own code
My code follows the project's style guidelines
Comments have been included that aid undertanding and enhance the
readability of the code
My changes generate no new warnings
Testing
I have tested this change locally, using the rose-stem suite
If any tests fail (rose-stem or CI) the reason is understood and
acceptable (eg. kgo changes)
I have added tests to cover new functionality as appropriate (eg. system
tests, unit tests, etc.)
trac.log
Security Considerations
This change does not introduce security vulnerabilities
I have reviewed the code for potential security issues
Sensitive data is properly handled (if applicable)
Authentication and authorisation are properly implemented (if applicable)
Performance Impact
Performance of the code has been considered and, if applicable, suitable
performance measurements have been conducted
AI Assistance and Attribution
Some of the content of this change has been produced with the assistance
of Generative AI tool name (e.g., Met Office Github Copilot Enterprise,
Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the Simulation Systems AI policy(including attribution labels)
Documentation
Where appropriate I have updated documentation related to this change and
confirmed that it builds correctly
Code Review
All dependencies have been resolved
Related Issues have been properly linked and addressed
This is a classic Ninja dyndep conflict: both shum and shum_constants (and other standalone targets) compile the same .f90 files and write .mod files to the shared modules/ (${CMAKE_Fortran_MODULE_DIRECTORY}) directory, so two rules claim ownership of the same .mod file. Make silently overwrites (so did not catch this in my original changes); Ninja rejects it.
The fix is to give each standalone target its own private Fortran_MODULE_DIRECTORY. Transitive target_link_libraries already propagates each library's module path to dependents (e.g. shum_byteswap -> shum_string_conv), so cross-lib compilation still works correctly.
I think the whole project can be CMake-refactored, once we deprecate the legacy approach.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cla-signedThe CLA has been signed as part of this PR - added by GA
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
This change finishes the CMake install parity work so downstream consumers (e.g., Mule) get the same critical install artifacts expected from the legacy build flow.
Code Reviewer: Sam Clarke-Green (@t00sa)
What's changed
libshum_constants.solibshum_string_conv.solibshum_wgdos_packing.solibshum_byteswap.solibshum_spiral_search.soshumlib_version.hc_shum_wgdos_packing_version.hSHUMLIB_VERSIONfor external consumers before includingshumlib_version.h.lib64directory for librarieslibsymlink pointing tolib64This keeps the existing aggregate library behaviour while adding/installing the required standalone targets and compatibility headers needed by downstream users.
I'll add an example wrapper script in MetOffice/mule in a separate Mule PR.
Checks
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
readability of the code
Testing
acceptable (eg. kgo changes)
tests, unit tests, etc.)
trac.log
Security Considerations
Performance Impact
performance measurements have been conducted
AI Assistance and Attribution
of Generative AI tool name (e.g., Met Office Github Copilot Enterprise,
Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the
Simulation Systems AI policy(including attribution labels)
Documentation
confirmed that it builds correctly
Code Review