-
Notifications
You must be signed in to change notification settings - Fork 90
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
CMake: Add option to download and build netCDF C++ API #2138
Conversation
John found he had to use |
Is it possible to automate this? ie get |
Yes, I think I just need to split the current |
Split FindNetCDF.cmake into two files so we can reuse the C bit if we're not downloading netcdf-cxx4
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.
This works for me, configuring with just cmake -DBOUT_DOWNLOAD_NETCDF_CXX4=ON ..
and tests pass. I wondered briefly whether it'd be good to add the -DBOUT_DOWNLOAD_NETCDF_CXX4=ON
flag in a test, but we only have one run using cmake at the moment so I don't think it's worth it.
- bout_add_library_alias: workaround for add_library(ALIAS) in CMake < 3.18 - bout_inspect_netcdf_config: get details from nx-config
My changes had broken things for the older version of netCDF-C on Travis, should be fixed now |
Also, I should note that the CMake module names have changed a little bit to be more in line with the upstream netCDF names, which are |
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.
auto-downloading netcdf-cxx4 still working on Marconi 👍
Fixes #2105
Currently uses my fork -- I've opened a PR, but it might be a while before it gets merged.
@johnomotani Any chance you could check this works on MARCONI?