-
Notifications
You must be signed in to change notification settings - Fork 20
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
Tarballs may not work due to cmake code not in repo #128
Comments
@edwardhartnett Shouldn't the clone be recursive prior to making a tarball? |
@aerorahul yes. Other than the NCEPLIBS overall package, does any other of the NCEPLIBS use submodules? |
@edwardhartnett yes. All of these have a dependency on NetCDF and the CMakeModules provide a |
FindNetCDF.cmake should be in every project that needs it, so that tarball distribution also works. Are there other cases? |
That will imply duplication and maintenance nightmare to go look for all the instances of it. |
@aerorahul no one said it would be easy. ;-) CMake has it's peculiarities, and one of them is that it requires a lot of code to do stuff like find netCDF. That's unfortunate, but not a reason to break tarball distributions. Tarballs are the main way software is distributed, so should be supported by NCEPLIBS. |
Not sure if this will work, but looking at the Github CLI, may be there is a way to include the submodule contents in the release tarball. https://cli.github.com/manual/gh_release_create I'll do a test later tonight. |
@aerorahul awesome, that would be great. |
umm. That failed spectacularly. GH CLI is not an option. |
Well that takes us back to adding a cmake directory and putting FindNetCDF.cmake in every project that needs it. It's a pain, but it's the exact same pain I feel because I have a FindNetCDF.cmake in netcdf-fortran, PIO, and the CCR library. CMake is special that way. The best answer would be to provide a canonical FindNetCDF to Kitware, and have them make that part of CMake. This is what HDF5 has. So perhaps we can pursue that, but that would take some time. |
Agreed on the Kitware contribution. Not sure about the time. Another (faster?) alternative is to have Unidata provide a pkg-config file with its cmake build of netCDF, that enables one to find netCDF without using |
You keep referring to Unidata. Perhaps you are not aware that netcdf-c is maintained by four people, two of whom are me: https://github.com/Unidata/netcdf-c/graphs/contributors. ;-) Ward at Unidata is too busy to do this. We must do it if we want it done. If we come up with a good solution, Ward will be happy with it and will endorse it, if that helps. We can submit a pkg-config PR to netcdf-c, and should do so. That will help moving forward and should be done. But none of that will change the need to put FindNetCDF.cmake in every project that uses it, for the next few NCEPLIBS releases. ;-) Eventually we might be able to stop. |
BTW one problem I'm having in another project is that FindNetCDF is not smart enough to figure out all the dependent libraries that might be in use by netcdf-c. It's not trivial to figure out! |
OK, I have added issues for this to w3emc and wrf_io, where the solution is straightforward. We will tackle wgrib2 and emc_post but not quite yet. ;-) |
I believe this has been accomplished in all repos where I can accomplish it. I cannot change the standard EMC custom of doing tags instead of releases, and requiring that uses use git to get the code, but at least all the NCEPLIBS have working tarballs and can have proper releases. |
Some of the NCEPLIBS repos use code from a cmake repo. These repos will not build from tarball because of this. The cmake code needed for each repo needs to live in that repo.
The text was updated successfully, but these errors were encountered: