Add CMake support to shumlib#26
Open
Sam Clarke-Green (t00sa) wants to merge 7 commits intoMetOffice:mainfrom
Open
Add CMake support to shumlib#26Sam Clarke-Green (t00sa) wants to merge 7 commits intoMetOffice:mainfrom
Sam Clarke-Green (t00sa) wants to merge 7 commits intoMetOffice:mainfrom
Conversation
Update the build system to use CMake. Enable support for running regression tests directly from the build files.
The top-level Makefile was incorrectly overwritten during testing by CMake. Restoring the file to the last valid commit to fix things.
Collaborator
James Bruten (james-bruten-mo)
left a comment
There was a problem hiding this comment.
As discussed offline the CI tests are failing as well, so need some tweaking
| set(SHUM_FRUIT_USE "${SHUM_FRUIT_USE}\nUSE fruit_test_${SHUM_LIBNAME}_mod") | ||
| set(SHUM_FRUIT_CALLS "${SHUM_FRUIT_CALLS}\nCALL fruit_test_${SHUM_LIBNAME}") | ||
|
|
||
| # FIXME: deal with relative path |
Collaborator
There was a problem hiding this comment.
Does this want fixing here?
Collaborator
Author
There was a problem hiding this comment.
I think this is stale, so I've removed it
Andrew Coughtrie (andrewcoughtrie)
left a comment
There was a problem hiding this comment.
I suspect it would be useful to have a pkg-config creation mechanism for this as well for when we need to pull it in with FAB.
Add a preprocessor macro to indicate when shumlib is being built with CMake. When this is not defined, apply the pre-CMake header versioning methods to prevent the integration tests from breaking. This code can be removed once the migration to CMake is complete.
James Bruten (james-bruten-mo)
approved these changes
Apr 13, 2026
Collaborator
James Bruten (james-bruten-mo)
left a comment
There was a problem hiding this comment.
Thanks, I think this looks good now
Collaborator
Author
|
Cameron Bateman (@cameronbateman-mo) I suggest we arrange a time to go through this ahead of your CR? |
Cameron Bateman (cameronbateman-mo)
approved these changes
Apr 17, 2026
Cameron Bateman (cameronbateman-mo)
left a comment
There was a problem hiding this comment.
Gone through with Sam, good work and I now understand a bit more about cmake 😁.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Sci/Tech Reviewer: James Bruten (@james-bruten-mo)
Code Reviewer: Cameron Bateman (@cameronbateman-mo)
Update the build system to use CMake. Enable support for running regression tests directly from the build files.
I think this would benefit from two sets of eyes, so I've added James as SR. I'll set aside some time to go through the change with Cameron as part of the CR.
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.)
Interactive Testing
Regression suite running under
ctestand running interactively.$SHUM_TMPDIRis set automatically by the ctest harness and manually in the interactive example:Security Considerations
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, suitableperformance measurements have been conducted
AI Assistance and Attribution
Some of the content of this change has been produced with the assistanceof 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 andconfirmed that it builds correctly
Documentation will be updated as part of a separate change
Code Review