Do not link against several transitive dependencies of HDF5 #926
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As described in conda-forge/dagmc-feedstock#25, some weirdness in how FindHDF5.cmake works results in transitive dependencies getting linked against, which causes issues in conda-forge with those libraries getting hardcoded in the installed DAGMCTargets.cmake file, thereby breaking potentially downstream applications that are trying to link against DAGMC. The "best" fix would be to use the proper
hdf5::hdf5
target provided by newer versions of CMake (3.19+), but I would hesitate to make that the required version. As such, the fix I'm proposed here is to manually remove libpthread, libdl, and libm from the list of HDF5 libraries. This should not cause any issues because:Motivation and Context
Described above
Changes
Described above
Behavior
Old behavior: All DAGMC libraries will be explicitly linked against HDF5 and its transitive dependencies
New behavior: All DAGMC libraries will be explicitly linked against HDF5 and several transitive dependencies (e.g., libcrypto, libcurl) but not libpthread, libdl, or libm
Changelog file
All pull requests are required to update the CHANGELOG file with the PR. Your update can take different forms including: