ess-dmsc / h5cpp

C++ wrapper for the HDF5 C-library
https://ess-dmsc.github.io/h5cpp/
GNU Lesser General Public License v2.1
116 stars 19 forks source link

Test cmake install and build examples #578

Closed planetmarshall closed 2 years ago

planetmarshall commented 2 years ago

Adds a step to the Debian-10 github workflow to install the CMake project and test that the examples can be built. A few fixes were necessary to get this to work.

planetmarshall commented 2 years ago

Also added option (off by default as this was the existing behaviour) to build the examples in the main CMake file (H5CPP_BUILD_EXAMPLES) as this makes it a bit easier to work with the example code as a developer.

planetmarshall commented 2 years ago

Incidentally, I think that's the codebase warning-free now so may be worth adding an option (say H5CPP_COMPILE_STRICT) and have it build with warnings as errors on CI.

jkotan commented 2 years ago

Incidentally, I think that's the codebase warning-free now so may be worth adding an option (say H5CPP_COMPILE_STRICT) and have it build with warnings as errors on CI.

It sounds good. But then probably the macos tests fail because

ld: warning: object file (/Users/runner/.conan/data/zlib/1.2.11/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib/libz.a(compress.o)) was built for newer macOS version (11.0) than being linked (10.15)
...

/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: lib/libh5cpp.a(direct_driver.cpp.o) has no symbols
planetmarshall commented 2 years ago

Incidentally, I think that's the codebase warning-free now so may be worth adding an option (say H5CPP_COMPILE_STRICT) and have it build with warnings as errors on CI.

It sounds good. But then probably the macos tests fail because

ld: warning: object file (/Users/runner/.conan/data/zlib/1.2.11/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib/libz.a(compress.o)) was built for newer macOS version (11.0) than being linked (10.15)
...

/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: lib/libh5cpp.a(direct_driver.cpp.o) has no symbols

Yes, that might be OK because it's a link not a compilation warning. I'll test it and raise a separate PR if it works.