find netcdf via its own cmake config
ClosedPublic

Authored by sitter on Apr 25 2019, 1:21 PM.

Details

Summary

no need to manually find it. cmake configs are vastly more reliable.

Test Plan

still builds

Diff Detail

Repository
R262 LabPlot
Branch
netcdf
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11219
Build 11237: arc lint + arc unit
sitter created this revision.Apr 25 2019, 1:21 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptApr 25 2019, 1:21 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
sitter requested review of this revision.Apr 25 2019, 1:21 PM
apol accepted this revision.Apr 25 2019, 3:53 PM
apol added a subscriber: apol.

LGTM

This revision is now accepted and ready to land.Apr 25 2019, 3:53 PM
This revision was automatically updated to reflect the committed changes.
sgerlach reopened this revision.Apr 26 2019, 9:45 PM
sgerlach added a subscriber: sgerlach.

There is no "FindnetCDF.cmake":

CMake Warning at CMakeLists.txt:265 (FIND_PACKAGE):

By not providing "FindnetCDF.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "netCDF", but
CMake did not find one.
This revision is now accepted and ready to land.Apr 26 2019, 9:45 PM

netcdf ships with a cmake config for a while now.

Meaning the file netCDFConfig.cmake installed by netcdf itself is used to find the lib/include stuff, no finder script necessary.

netCDFConfig.cmake is not available at least on OpenSUSE and Fedora (any version). Also a ./configure && make install of the latest version does not install the file.

https://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html#netCDF-CMake

Apparently netcdf may be built with cmake or autotools, but the latter won't install all the files the former will 🤕

I suppose we can take the same route as for cantor (use config and fall back to finder if no config is present). I'll get on it on Monday.