BUG: Remove hardcoded HDF5 system paths from ITKTargets#6494
Draft
blowekamp wants to merge 2 commits into
Draft
Conversation
Scope ITKHDF5_SYSTEM_INCLUDE_DIRS to the variable-fallback branch so it is only set when no imported target is available. Imported targets carry their own include interface and do not need baked-in paths. Also consolidate the shared/static target-detection branches using a single _hdf5_type suffix variable.
CMake 3.19+ FindHDF5 always provides hdf5::hdf5 imported targets. Since ITK requires CMake >= 3.22, the variable-only fallback path is unreachable on any supported configuration. Replace it with a fatal error directing users to set HDF5_DIR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two fixes to the
ITK_USE_SYSTEM_HDF5path inITKHDF5CMakeLists:ITKHDF5_SYSTEM_INCLUDE_DIRSto the variable-fallback branch only — imported targets carry their own include interface and do not need baked-in paths in the installed config files._hdf5_typesuffix variable.FATAL_ERROR: CMake 3.19+FindHDF5always provideshdf5::hdf5imported targets, and ITK requires CMake ≥ 3.22.Companion to #6491, #6492, and #6493 which applied the same imported-target pattern to ZLIB, Expat, JPEG, PNG, and double-conversion.