Improve CMake detection of whether NetCDF is found#30
Conversation
Without this fix, the build on my Mac finds a netCDFConfig.cmake file (rather than a FindNetCDF.cmake file) that causes entrance into the wrong block. Resolves ESMCI#29 Co-authored-by: Luca Bertagna <lbertag@sandia.gov>
|
@bartgol - FYI In addition to my Mac, I have tested this on NSF NCAR's derecho system; the cprnc build still works there, though it was entering the It would be great if someone could test this somewhere where we expect to enter the block where netcdf is found (i.e., the |
|
@bartgol - I can't add you as a reviewer, but I'll wait to merge this until you give your official go-ahead, since you're the one who suggested this change. If you have a way to test this on a system where we should enter the first block (where netcdf is found) that would make me feel better, but if you're fairly confident in this change without that, I'm okay moving ahead with merging it with your "okay". |
|
I am trying this branch within e3sm, to verify it works as expected. Edit: on my machine, it picks up the "else" branch of the outermost if. But that's what it was picking up before anyways. Imho, this can be merged. E3SM has cprnc pre-installed in most production machines anyways, so the risk of bad impacts is minimal. Besides, as I said on the issue page, I think this mod is conceptually more correct, since the find pkg call is explicitly listing the components. |
|
Okay, thanks, @bartgol ! |
Update cprnc from v1.1.3 to v1.1.4 Main change is a fix to the CMake build fo NetCDF: ESMCI/cprnc#30 Also includes fix to a typo in the README: ESMCI/cprnc#26
Without this fix, the build on my Mac finds a netCDFConfig.cmake file (rather than a FindNetCDF.cmake file) that causes entrance into the wrong block.
Resolves #29
Fix suggested by @bartgol