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

Update FindESMF.cmake #452

Closed
wants to merge 1 commit into from
Closed

Conversation

aerorahul
Copy link
Contributor

This PR updates FindESMF.cmake based on esmf.mk to define the following variables:

  • create ESMF_VERSION string based on ESMF_VERSION_STRING_GIT
  • define MAJOR, MINOR, PATCH, TWEAK components of ESMF_VERSION
  • add a variable ESMF_BETA_RELEASE to indicate returned version is a Beta release.

Usage:

find_package(ESMF <VERSION> <REQUIRED>)

If the found version is less than the desired VERSION, find_package will fail with an error message.

I have tested a stripped down build on my macOS and Orion, but not on the various platforms.

@edwardhartnett
Copy link
Collaborator

These changes look great. CI is failing due to the macos homebrew problem... @kgerheiser does that get fixed with a brew update command somewhere?

@edwardhartnett
Copy link
Collaborator

OK, turns out there's a problem here. See the comments in this issue:
NOAA-EMC/hpc-stack#208

@kgerheiser
Copy link
Contributor

Yes, that's a problem, but the good news is since we have our own FindESMF.cmake we can do whatever we like regarding version checking. Might have to remove the version from find_package_handle_standard_args and handle it ourselves or otherwise modify it before passing it.

@aerorahul
Copy link
Contributor Author

Yes, that's a problem, but the good news is since we have our own FindESMF.cmake we can do whatever we like regarding version checking. Might have to remove the version from find_package_handle_standard_args and handle it ourselves or otherwise modify it before passing it.

@kgerheiser
Do you want to implement the subtraction and handling of the TWEAK?
If not, I will have to get back to this sometime next week.

I would prefer keeping the find_package_handle_standard_args and work to find a solution that fits in.

@edwardhartnett
Copy link
Collaborator

OK, last week the ESMF team did a release for us.

Perhaps we should forget about checking for beta releases, and only support checking for full releases in the CMake.

This would match what is generally done. For example, when requiring a netcdf-c version, we will only worry about actual netcdf-c releases, not any intermediate releases. Dealing with those will be up to the developers, not hpc-stack.

With this relaxation, the problem becomes a lot simpler, right?

@kgerheiser
Copy link
Contributor

kgerheiser commented Apr 26, 2021

@edwardhartnett Yes, just getting the version is straightforward.

@GeorgeGayno-NOAA
Copy link
Collaborator

Can the feature/esmf_minimum_version branch be removed?

@aerorahul aerorahul deleted the feature/esmf_minimum_version branch June 8, 2021 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants