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

Need to copy FindNetcdf.cmake into cmake directory, and not depend on CMakeModules, in order for releases to work #384

Closed
edwardhartnett opened this issue Sep 23, 2021 · 5 comments · Fixed by #385
Assignees
Labels
enhancement New feature or request

Comments

@edwardhartnett
Copy link
Collaborator

When you mark a release in GitHub, it packages up the repo for you and provides that as a .tar.gz file, available on the "Releases" page.

However, in the case of UPP, all these tarballs are broken, because the GitHub packaging is not smart enough to handle submodules. :-(

As a result, you need to copy the FindNetCDF.cmake file into your cmake directory, and use it from there. This is unfortunate, because it is a copy of the .cmake file, which will have to be manually updated to bring in any changes to the CMakeModules version of the file. However, this is just a consequence of how CMake works, and how GitHub packages files, so with the NCEPLIBS projects, we just live with these extra copies.

The error you will get attempting to build from one of your releases is:

 >> 11    CMake Error at CMakeLists.txt:34 (find_package):
     12      By not providing "FindNetCDF.cmake" in CMAKE_MODULE_PATH this project has
     13      asked CMake to find a package configuration file provided by "NetCDF", but
     14      CMake did not find one.
     15    
     16      Could not find a package configuration file provided by "NetCDF" with any
     17      of the following names:

@WenMeng-NOAA
Copy link
Collaborator

@edwardhartnett Thanks for addressing this issue in UPP. Would you please submit a PR for your solution? Thanks!

@fossell
Copy link
Contributor

fossell commented Sep 23, 2021

Yes this is known limitation. For community standalone applications, we've documented use of git clone as the procedure to obtain the code, instead of advertising downloading a tarball, for this reason. This was also an issue in the past when crtm was a submodule to UPP, but we have since moved to using crtm as part of NCEPLIBS.

@EdwardColon-NOAA - Do you have recommendations on how to remain up to date with CMakeModules? Manually check at a specified cadence? What does NCEPLIBS do?

@kgerheiser
Copy link
Contributor

Changes are few and far between. We can put in a PR if there's any substantial change that needs to be propagated.

@fossell
Copy link
Contributor

fossell commented Sep 23, 2021

@kgerheiser - Great, thanks!

@WenMeng-NOAA
Copy link
Collaborator

@edwardhartnett and @kgerheiser Thanks for help to enhance UPP.

EricJames-NOAA pushed a commit to EricJames-NOAA/UPP that referenced this issue Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants