Unidata / netcdf-cxx4

Official GitHub repository for netCDF-C++ libraries and utilities.
Other
124 stars 49 forks source link

Install netCDFCxxConfig.cmake #62

Closed ZedThree closed 4 years ago

ZedThree commented 5 years ago

Fixes #43

An issue here that I've not fixed as it needs a decision from the maintainers: the installed target is netcdf-cxx4 (with a netCDF:: namespace). I think it might be more idiomatic if it were called netCDF_CXX, or NetCDF_CXX. The C API installs netCDF.

WardF commented 4 years ago

Resolving conflicts and getting this merged in, finally. Thanks!

j-eser commented 4 years ago

Is there any update? I installed the library via conda and still there is no netCDFCxxConfig.cmake. Is there an alternative solution for using this library in external cmake file? Thanks

r3n4ud commented 4 years ago

Any plan on merging this?

WardF commented 4 years ago

Yes; we are wrapping up a Fortran release and then I will get this rolled out into a release.

r3n4ud commented 4 years ago

Great news, thank you!

Your merging has failed since there are two "traverse directory section"... I've fixed this on my fork yesterday on my own branch (using @ZedThree 's commit and resolving the merge with master manually). See https://github.com/r3n4ud/netcdf-cxx4/tree/cmake-dev, maybe you could use that? Warning: I pushed

Let me know if you would a pull request from my fork/cmake-dev branch

ZedThree commented 4 years ago

I've fixed the merge, plus some other issues I came across. It now works consistently with netCDF-C CMake and autoconf builds.

@WardF I think you need to make a decision on naming. This currently installed a package called netCDFCxx, but the target is netCDF::netcdf-cxx4 which feels a bit inconsistent. The C version exports a package netCDF and the target is just netcdf.

ZedThree commented 4 years ago

Travis is failing with errors like cxx4/CMakeFiles/netcdf-cxx4.dir/build.make:487: *** target pattern contains no '%'. Stop.

I can't reproduce this locally, even in the docker container!

ZedThree commented 4 years ago

Turns out I was using an older version of the C library. It now exports the target netCDF::netcdf, so this exporting netCDF::netcdf-cxx4 feels more consistent. I'm still not sure about the package name though.

WardF commented 4 years ago

It looks good to me! Thanks @ZedThree