Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set H5 specific vars immediately if legacy find #4512

Merged
merged 5 commits into from
May 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeFilters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT ZLIB_FOUND)
find_package (ZLIB) # Legacy find
set (H5_ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIRS})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't these also need to be set if the first find_package call succeeds?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confusing two different processes! No wonder it doesn't work

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on this refactoring, it even seems like the H5_ZLIB_FOUND and H5_SZIP_FOUND aren't really needed at a first glance, though there could be other places they're used that I'm not seeing in the limited diff context.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe - but let's make sure everything works first

set (H5_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
endif ()
set(H5_ZLIB_FOUND ${ZLIB_FOUND})
if (H5_ZLIB_FOUND)
Expand Down Expand Up @@ -126,6 +128,8 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
set (H5_SZIP_INCLUDE_DIR ${SZIP_INCLUDE_DIRS})
set (H5_SZIP_LIBRARIES ${SZIP_LIBRARIES})
endif ()
endif ()
set(H5_SZIP_FOUND ${SZIP_FOUND})
Expand Down
Loading