Commit c09f1706 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

hdf5: use the superbuild's version

parent b24b670c
Pipeline #214916 waiting for manual action with stages
# The common superbuild's hdf5 configuration does not set CMAKE_INSTALL_RPATH,
# so we override it with our own hdf5 configuration.
superbuild_add_project(hdf5
CAN_USE_SYSTEM
DEPENDS zlib szip
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_RPATH:PATH=$ORIGIN/../lib
-DHDF5_BUILD_EXAMPLES:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=TRUE
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=TRUE
-DHDF5_ENABLE_SZIP_ENCODING:BOOL=TRUE
-DHDF5_BUILD_HL_LIB:BOOL=TRUE
-DHDF5_BUILD_WITH_INSTALL_NAME:BOOL=ON)
superbuild_add_extra_cmake_args(
-DHDF5_ROOT:PATH=<INSTALL_DIR>
-DHDF5_NO_FIND_PACKAGE_CONFIG_FILE:BOOL=ON)
superbuild_apply_patch(hdf5 fix-ext-pkg-find
"Force proper logic for zlib and szip dependencies")
find_package(HDF5 REQUIRED)
superbuild_add_extra_cmake_args(
-DHDF5_C_LIBRARY:FILEPATH=${HDF5_C_LIBRARY}
-DHDF5_HL_LIBRARY:FILEPATH=${HDF5_HL_LIBRARY}
-DHDF5_LIBRARY:FILEPATH=${HDF5_LIBRARY}
-DHDF5_INCLUDE_DIRS:PATH=${HDF5_INCLUDE_DIRS})
diff -u -U5 -r hdf5-1.10.3/CMakeFilters.cmake hdf5-1.10.3.fix-ext-pkg-find/CMakeFilters.cmake
--- hdf5-1.10.3/CMakeFilters.cmake 2018-08-09 17:36:31.000000000 -0400
+++ hdf5-1.10.3.fix-ext-pkg-find/CMakeFilters.cmake 2019-03-15 11:53:03.238932850 -0400
@@ -39,13 +39,13 @@
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (NOT H5_ZLIB_HEADER)
if (NOT ZLIB_USE_EXTERNAL)
- find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
+ #find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT ZLIB_FOUND)
- find_package (ZLIB) # Legacy find
+ find_package (ZLIB MODULE) # Legacy find
if (ZLIB_FOUND)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES})
set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${ZLIB_LIBRARIES})
endif ()
endif ()
@@ -90,16 +90,21 @@
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
if (HDF5_ENABLE_SZIP_SUPPORT)
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
if (NOT SZIP_USE_EXTERNAL)
- find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
+ #find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT SZIP_FOUND)
- find_package (SZIP) # Legacy find
+ if (WIN32)
+ find_package (SZIP CONFIG) # Legacy find
+ else ()
+ find_package (SZIP) # Legacy find
+ endif ()
if (SZIP_FOUND)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_LIBRARIES})
+ set (SZIP_INCLUDE_DIR ${SZIP_INCLUDE_DIRS})
endif ()
endif ()
endif ()
if (SZIP_FOUND)
set (H5_HAVE_FILTER_SZIP 1)
include("${CMAKE_CURRENT_LIST_DIR}/../hdf5.cmake")
# On Windows, find_package(HDF5) with cmake 2.8.[8,9] always ends up finding
# the dlls instead of the libs. So setting the variables explicitly for
# dependent projects.
superbuild_add_extra_cmake_args(
-DHDF5_C_LIBRARY:FILEPATH=<INSTALL_DIR>/lib/hdf5.lib
-DHDF5_HL_LIBRARY:FILEPATH=<INSTALL_DIR>/lib/hdf5_hl.lib
# This variable is for CGNS, since CGNS doesn't use standard find_package()
# to find hdf5.
-DHDF5_LIBRARY:FILEPATH=<INSTALL_DIR>/lib/hdf5.lib
# These variables are for netcdf
-DHDF5_LIB:FILEPATH=<INSTALL_DIR>/lib/hdf5.lib
-DHDF5_HL_LIB:FILEPATH=<INSTALL_DIR>/lib/hdf5_hl.lib
-DHDF5_INCLUDE_DIR:FILEPATH=<INSTALL_DIR>/include)
if (NOT superbuild_is_64bit)
# On 32-bit Windows, H5public.h ends up redefining ssize_t. This patch ensures
# that the old definition is undef-ed before redefining it.
superbuild_apply_patch(hdf5 fix-ssize_t-redefine
"Fix ssize_t redefinition on 32-bit Windows")
endif ()
if (MSVC)
# hdf5 has a bug with MSVC compiler where it doesn't realize its using MSVC
# compiler when using nmake or ninja generators. This patch fixes that.
superbuild_apply_patch(hdf5 msvc-non-vs-generator
"Fix MSVC detection with Makefiles and Ninja generators")
# VS2015 support
superbuild_apply_patch(hdf5 vs2015-support
"Support Visual Studio 2015")
endif ()
diff -u -Nru5 hdf5-1.10.3/config/cmake_ext_mod/ConfigureChecks.cmake hdf5-1.10.3.msvc-non-vs-generator/config/cmake_ext_mod/ConfigureChecks.cmake
--- hdf5-1.10.3/config/cmake_ext_mod/ConfigureChecks.cmake 2018-08-09 17:36:31.000000000 -0400
+++ hdf5-1.10.3.msvc-non-vs-generator/config/cmake_ext_mod/ConfigureChecks.cmake 2019-03-14 10:08:32.051965687 -0400
@@ -62,15 +62,10 @@
# WINDOWS Hard code Values
# ----------------------------------------------------------------------
set (WINDOWS)
if (WIN32)
- if (MINGW)
- set (${HDF_PREFIX}_HAVE_MINGW 1)
- set (WINDOWS 1) # MinGW tries to imitate Windows
- set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
- endif ()
set (${HDF_PREFIX}_HAVE_WIN32_API 1)
set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
if (NOT UNIX AND NOT MINGW)
set (WINDOWS 1)
set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
@@ -86,13 +81,11 @@
set (${HDF_PREFIX}_HAVE_SYS_TYPES_H 1)
set (${HDF_PREFIX}_HAVE_LIBM 1)
set (${HDF_PREFIX}_HAVE_STRDUP 1)
set (${HDF_PREFIX}_HAVE_SYSTEM 1)
set (${HDF_PREFIX}_HAVE_LONGJMP 1)
- if (NOT MINGW)
- set (${HDF_PREFIX}_HAVE_GETHOSTNAME 1)
- endif ()
+ set (${HDF_PREFIX}_HAVE_GETHOSTNAME 1)
if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1)
endif ()
set (${HDF_PREFIX}_HAVE_FUNCTION 1)
set (${HDF_PREFIX}_GETTIMEOFDAY_GIVES_TZ 1)
diff -u -Nru5 hdf5-1.10.3/config/cmake_ext_mod/ConfigureChecks.cmake hdf5-1.10.3.vs2015-support/config/cmake_ext_mod/ConfigureChecks.cmake
--- hdf5-1.10.3/config/cmake_ext_mod/ConfigureChecks.cmake 2018-08-09 17:36:31.000000000 -0400
+++ hdf5-1.10.3.vs2015-support/config/cmake_ext_mod/ConfigureChecks.cmake 2019-03-14 10:09:36.891964526 -0400
@@ -94,11 +94,13 @@
if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1)
endif ()
set (${HDF_PREFIX}_HAVE_FUNCTION 1)
set (${HDF_PREFIX}_GETTIMEOFDAY_GIVES_TZ 1)
- set (${HDF_PREFIX}_HAVE_TIMEZONE 1)
+ if (NOT MSVC14)
+ set (${HDF_PREFIX}_HAVE_TIMEZONE 1)
+ endif ()
set (${HDF_PREFIX}_HAVE_GETTIMEOFDAY 1)
if (MINGW)
set (${HDF_PREFIX}_HAVE_WINSOCK2_H 1)
endif ()
set (${HDF_PREFIX}_HAVE_LIBWS2_32 1)
......@@ -80,10 +80,6 @@ superbuild_set_revision(cmbworkflows
GIT_TAG "origin/master"
GIT_SHALLOW "${SUPERBUILD_SHALLOW_CLONES}")
superbuild_set_revision(hdf5
URL "https://www.paraview.org/files/dependencies/hdf5-1.10.3.tar.bz2"
URL_MD5 56c5039103c51a40e493b43c504ce982)
superbuild_set_revision(libarchive
URL https://www.libarchive.org/downloads/libarchive-3.3.3.tar.gz
URL_MD5 4038e366ca5b659dae3efcc744e72120)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment