Skip to content
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

Fix CMake circular dependencies for external use #273

Merged
merged 9 commits into from
Aug 12, 2024

Conversation

mathomp4
Copy link
Member

@mathomp4 mathomp4 commented Apr 17, 2024

As found by @climbfuji, if you build GEOSgcm, you get three sets of CMake files for doing find_package: MAPL, GEOSgcm, and GOCART. This then causes circular dependencies as GOCART requires things "provided" by GEOSgcm and GEOSgcm requires GOCART.

So this PR tries to "detect" if GOCART is being built as a standalone project or as part of GEOS.

ETA: In tests trying to build GOCART with MAPL-as-library-from-spack, it was found that you need to protect against the chance MAPL is found as a library. Then you can't add MAPL as a new subdirectory as targets will be duplicated.

@mathomp4 mathomp4 added the 0 diff The changes in this pull request have verified to be zero-diff with the target branch. label Apr 17, 2024
@mathomp4 mathomp4 self-assigned this Apr 17, 2024
@mathomp4 mathomp4 marked this pull request as ready for review April 22, 2024 12:48
@mathomp4 mathomp4 requested a review from a team as a code owner April 22, 2024 12:48
@mathomp4
Copy link
Member Author

@climbfuji said this worked for him. So I'll undraft.

@rtodling
Copy link

I hope this can make up so 11.5.3 version of the model - very important for GEOS-JEDI development.

Copy link

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for thes updates @mathomp4 . This works fine for us (JCSDA)!

@mathomp4 mathomp4 changed the title WIP: Fix CMake circular dependencies for external use Fix CMake circular dependencies for external use May 8, 2024
@mathomp4 mathomp4 requested a review from climbfuji July 29, 2024 17:16
Copy link

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand these changes very well, but if it works it works!

@vbuchard vbuchard merged commit 87fdd39 into develop Aug 12, 2024
5 of 11 checks passed
@vbuchard vbuchard deleted the feature/mathomp4/test-no-standalone-dev branch August 12, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff The changes in this pull request have verified to be zero-diff with the target branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants