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 FindNetCDF.cmake with better tests #262

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gsjaardema
Copy link
Contributor

As of NetCDF-4.5.0, the NC_MAX_VARS and NC_MAX_DIMS limits are no longer enforced, so it isn't necessary to check their values. While updating the test and whether to perform it or not, I discovered that the current parsing of NC_MAX_VARS and NC_MAX_DIMS was returning incorrect values.

To fix this, I added a REGEX to strip the C comment from the end of the string.
I also parsed more values from the netcdf_meta.h file if it exists instead of parsing some values from it and some from the nc-config script.

Tested on several versions of NetCDF and values all look reasonable

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.

1 participant