Skip to content

Commit

Permalink
CMake: Change header in check for HDF5 zlib/szip support
Browse files Browse the repository at this point in the history
H5public.h might require MPI headers which we haven't found at this
point

Fixes #2742
  • Loading branch information
ZedThree committed Oct 2, 2023
1 parent 3c789c6 commit b6cb581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ IF(USE_HDF5)
# This needs to be near the beginning since we
# need to know whether to add "-lz" to the symbol
# tests below.
CHECK_C_SOURCE_COMPILES("#include <H5public.h>
CHECK_C_SOURCE_COMPILES("#include <H5pubconf.h>
#if !H5_HAVE_ZLIB_H
#error
#endif
Expand All @@ -879,7 +879,7 @@ IF(USE_HDF5)
ENDIF()

#Check to see if H5Z_SZIP exists in HDF5_Libraries. If so, we must use szip library.
CHECK_C_SOURCE_COMPILES("#include <H5public.h>
CHECK_C_SOURCE_COMPILES("#include <H5pubconf.h>
#if !H5_HAVE_FILTER_SZIP
#error
#endif
Expand Down

0 comments on commit b6cb581

Please sign in to comment.