-
Notifications
You must be signed in to change notification settings - Fork 2
CMake: Make access3 and solo ocean builds non-exclusive #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
anton-seaice
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird stylistic questions only:
I was imagining a set() for drivers, so that the set could be extended in the future?
e.g.
set(drivers)
foreach (_drive IN LISTS drivers)
add_subdirectory(... <something about _drive>)
endif()
similar to access3 - https://github.com/ACCESS-NRI/access3-share/blob/main/cmake/Access3BinInstall.cmake
and why do the CMakeLists.txt files go in the cmake folder rather than the relevant src folder?
This could get rid of these variables:
# set paths for the source code and config source
set(SRC "${CMAKE_SOURCE_DIR}/src")
set(CONFIG_SRC "${CMAKE_SOURCE_DIR}/config_src")
and use relative paths
d19b90c to
ce0ee7c
Compare
We chatted about this in person and decided the current approach is simplest for the SPR. We are unlikely to add additional targets.
@anton-seaice I tried this in ce0ee7c and I'm not sure how I feel about it. It's probably more in line with typical CMake practice... Thoughts/opinions? |
499a2bc to
a2fb984
Compare
anton-seaice
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In testing:
For completeness, it would be good to have builds for both +mom6_solo, and ~mom6_solo and also +mom6_solo without access3 at all.
@micaeljtoliveira - would you be able to review this ? I think we're mainly looking for advice on if this is a clear/standard(ish) way to organise the CMake build files and their contents.
a2fb984 to
34da855
Compare
|
34da855 to
b4ac04c
Compare
@anton-seaice I had a look, but your use case is so unusual that I don't think "standard" CMake organisation really applies here, except the usual basic stuff, like putting common code in libraries that can be reused. The only thing I would do different, is putting the source files specific to the solo driver in their own library and not modify the |
|
Thanks @micaeljtoliveira I don't think I have any comments @dougiesquire I think the CI should work though ? |
Yeah we need this first: #32. I'll get to it today. |
2a35972 to
c61ff5c
Compare
|
@anton-seaice CI now works, but I think I'd like to move the manifest changes into a subsequent PR |
c61ff5c to
80ae8b6
Compare
|
@anton-seaice are you happy to approve? |
anton-seaice
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dougiesquire
This PR modifies the CMake build system to make the access3 and solo ocean builds non-exclusive.
Changes
MOM6_SOLOthat can be used at the same time asMOM6_ACCESS3to build a MOM6 executable with thesolo_driver.mom6sharedto build the shared components of themom6libACCESS3 library andmom6-soloexecutable.MOM6_OPENMPis set - see CMake: Not linking OpenMP #35Related PRs
MOM6_SOLOoption as a variant in the access-mom6 SPR are here.