[CMake] Use hdf target as opposed to HDF5_CXX_LIBRARIES#1665
[CMake] Use hdf target as opposed to HDF5_CXX_LIBRARIES#1665KrisThielemans merged 3 commits intoUCL:masterfrom
Conversation
Using targets is recommended, as it will add compiler flags etc as needed. It might also resolve conda-forge/stir-feedstock#149, as with this update, `STIRTargets.cmake` contains `hdf5::hdf5_cpp` as opposed to explicit filenames.
|
hmmm. The "demos" that link against STIR have I also see this on my machine, including for |
|
Multiple possible causes:
On my system, when using a conda-forge hdf5, adding cmake_print_properties(
TARGETS hdf5::hdf5_cpp hdf5::hdf5 HDF5::HDF5
PROPERTIES LOCATION INTERFACE_INCLUDE_DIRECTORIES IMPORTED_LINK_INTERFACE_LIBRARIES IMPORTED_LINK_DEPENDENT_LIBRARIES LINK_INTERFACE_LIBRARIES
)and using This is the usual case where if there is no sigh |
|
Apologies, I was printing the old When using the system (APT) version, and h5c++ installed So, it seems we would have more chance with using |
mark it as advanced to avoid confusing users
Using targets is recommended, as it will add compiler flags etc as needed. It might also resolve
conda-forge/stir-feedstock#149, as with this update,
STIRTargets.cmakecontainshdf5::hdf5_cppas opposed to explicit filenames.This fix was recommended by @traversaro at #general > dependency on $BUILD_PREFIX/...libpthread.so problem @ 💬