mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-23 16:20:57 +08:00
* Test fixes for log-based vol (#4618) * fixes to address failures in the log-based VOL * moved file cleanup to tests proper * skipped index API test if not supported * Add 'try' parameter to H5Z_find, and remove calls to H5E_clear_stack() (#4609) * Bump the github-actions group with 4 updates (#4620) Bumps the github-actions group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials), [softprops/action-gh-release](https://github.com/softprops/action-gh-release) and [github/codeql-action](https://github.com/github/codeql-action). Updates `actions/checkout` from 4.1.1 to 4.1.7 - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v4.1.1...v4.1.7) Updates `aws-actions/configure-aws-credentials` from 1 to 4 - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/v1...v4) Updates `softprops/action-gh-release` from 2.0.5 to 2.0.6 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](69320dbe05...a74c6b72af
) Updates `github/codeql-action` from 3.25.7 to 3.25.11 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](f079b84933...b611370bb5
) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: aws-actions/configure-aws-credentials dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: softprops/action-gh-release dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix a stack size warning in ros3 VFD code (#4625) Just makes a stack array dynamic. Valgrind shows no memory leaks. * Reworked cleaning up API test files (#4626) * Reworked cleaning up test files, only removing test files if present to account for skipped tests * changed to using H5Fis_accessible * update to full use of remove_test_file * corrected offset type in C wrapper (#4622) * Remove some internal use of API calls and H5E_BEGIN_TRY/H5E_END_TRY (#4624) * Remove auto NSIS check because of issues with CI (#4646) * Add python testing for examples (#4628) * Clean up Fortran __float128 configure-time checks (#4649) * Always use DECIMAL_DIG instead of LDBL_DIG. This was controlled by an ifdef that is always true in C99 or greater It's confusing to use float.h C constants as variable names in configure.ac and the PAC_FC_LDBL_DIG macro. * Directly compare MY_FLT128_DIG and MY_LDBL_DIG * Make uniform across CMake and Autotools * Don't export quadmath.h variables to H5pubconf.h * Feature/awesome (#4604) * Added Doxygen Awesome and fixed a few quirks. * Fixed unterminated strings. * Added Doxygen Awesome by copy. * Add tools usage text as doxygen for Tools UG (#4602) * Add h5* compiler wrapper testing for CMake #4605 (#4613) * Add show option * remove non-static libs and correct names of static libs * Fixup the pkg-config libs and comp builds * Fix commands and add fortran pkg-config test scripts * Add help usage option * Add temporary fix for ARM64 Mac _Float16 build failure (#4639) * Correct H5VL_t ref count on H5O_refresh_metadata failure (#4636) * Fix bad H5VL_t rc on H5O_refresh_metadata fail * Decrement nrefs before raising error * Update doxygen Learn Basics / example refs. Add Reference sections (#4640) * Fixed messed up table captions. (#4653) * Fixed messed up table captions. Browsers don't seem to respect relative values for width. Hardcoding 800px for now. * Fixed FetchContent usage for new CMake reqs. (#4650) CMake version 3.30 changed the behavior of the FetchContent module to deprecate the use of FetchContent_Populate() in favor of FetchContent_MakeAvailable(). Therefore, the copying of HDF specialized CMakeLists.txt files to the dependent project's source was implemented in the FetchContent_Declare() call. * Fixed usage issue with FindZLIB.cmake module (#4655) * Add a comment on the FindZLIB.cmake module usage * Allow choice of static/shared compression libs for Find Module * Added new option to INSTALL_CMake file and changed option text * Eliminate more H5E_BEGIN/END_TRY macros and H5E_clear_stack() calls (#4648) * Correct name of zlib_ng option (#4658) * Fix the examples for testing java with binaries (#4660) * Update filename in RELEASE_PROCESS.md to current name INSTALL_autotools.txt. * Remove reference to V116 in tools/src/h5repack/h5repack.h.
191 lines
7.7 KiB
CMake
191 lines
7.7 KiB
CMake
#
|
|
# Copyright by The HDF Group.
|
|
# All rights reserved.
|
|
#
|
|
# This file is part of HDF5. The full HDF5 copyright notice, including
|
|
# terms governing use, modification, and redistribution, is contained in
|
|
# the COPYING file, which can be found at the root of the source code
|
|
# distribution tree, or in https://www.hdfgroup.org/licenses.
|
|
# If you do not have access to either file, you may request a copy from
|
|
# help@hdfgroup.org.
|
|
#
|
|
option (HDF5_USE_ZLIB_NG "Use zlib-ng library as zlib library" OFF)
|
|
option (HDF5_USE_ZLIB_STATIC "Find static zlib library" OFF)
|
|
option (HDF5_USE_LIBAEC_STATIC "Find static AEC library" OFF)
|
|
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" OFF)
|
|
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" OFF)
|
|
|
|
if (NOT ZLIB_USE_LOCALCONTENT)
|
|
if (HDF5_USE_ZLIB_NG)
|
|
set (ZLIB_URL ${ZLIBNG_TGZ_ORIGPATH}/${ZLIBNG_TGZ_NAME})
|
|
else ()
|
|
set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_NAME})
|
|
endif ()
|
|
else ()
|
|
if (HDF5_USE_ZLIB_NG)
|
|
set (ZLIB_URL ${TGZPATH}/${ZLIBNG_TGZ_NAME})
|
|
else ()
|
|
set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
|
|
endif ()
|
|
endif ()
|
|
message (VERBOSE "Filter ZLIB file is ${ZLIB_URL}")
|
|
|
|
if (NOT LIBAEC_USE_LOCALCONTENT)
|
|
set (SZIP_URL ${LIBAEC_TGZ_ORIGPATH}/${LIBAEC_TGZ_NAME})
|
|
else ()
|
|
set (SZIP_URL ${TGZPATH}/${LIBAEC_TGZ_NAME})
|
|
endif ()
|
|
message (VERBOSE "Filter SZIP file is ${SZIP_URL}")
|
|
|
|
include (ExternalProject)
|
|
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
|
|
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)")
|
|
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
|
|
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
|
set (ZLIB_USE_EXTERNAL ON CACHE BOOL "Use External Library Building for ZLIB else search" FORCE)
|
|
set (SZIP_USE_EXTERNAL ON CACHE BOOL "Use External Library Building for SZIP else search" FORCE)
|
|
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
|
|
set (ZLIB_URL ${ZLIB_GIT_URL} CACHE STRING "Path to zlib git repository")
|
|
set (ZLIB_BRANCH ${ZLIB_GIT_BRANCH})
|
|
set (SZIP_URL ${LIBAEC_GIT_URL} CACHE STRING "Path to szip git repository")
|
|
set (SZIP_BRANCH ${LIBAEC_GIT_BRANCH})
|
|
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
|
if (NOT TGZPATH)
|
|
set (TGZPATH ${HDF5_SOURCE_DIR})
|
|
endif ()
|
|
if (ZLIB_USE_LOCALCONTENT)
|
|
if (NOT EXISTS "${ZLIB_URL}")
|
|
set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
|
|
message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found")
|
|
endif ()
|
|
endif ()
|
|
if (LIBAEC_USE_LOCALCONTENT)
|
|
if (NOT EXISTS "${SZIP_URL}")
|
|
set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
|
|
message (VERBOSE "Filter SZIP file ${SZIP_URL} not found")
|
|
endif ()
|
|
endif ()
|
|
else ()
|
|
set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
|
|
set (ZLIB_USE_EXTERNAL OFF CACHE BOOL "Use External Library Building for ZLIB else search")
|
|
set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
|
|
set (SZIP_USE_EXTERNAL OFF CACHE BOOL "Use External Library Building for SZIP else search")
|
|
endif ()
|
|
endif ()
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Option for ZLib support
|
|
#-----------------------------------------------------------------------------
|
|
set(H5_ZLIB_FOUND FALSE)
|
|
option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON)
|
|
if (HDF5_ENABLE_Z_LIB_SUPPORT)
|
|
if (NOT H5_ZLIB_HEADER)
|
|
if (NOT ZLIB_USE_EXTERNAL)
|
|
if (HDF5_USE_ZLIB_NG)
|
|
set (PACKAGE_NAME ${ZLIBNG_PACKAGE_NAME}${HDF_PACKAGE_EXT})
|
|
else ()
|
|
set (PACKAGE_NAME ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
|
|
endif ()
|
|
set(ZLIB_FOUND FALSE)
|
|
if (HDF5_USE_ZLIB_STATIC)
|
|
set(ZLIB_SEACH_TYPE static)
|
|
else ()
|
|
set(ZLIB_SEACH_TYPE shared)
|
|
endif ()
|
|
find_package (ZLIB NAMES ${PACKAGE_NAME} COMPONENTS ${ZLIB_SEACH_TYPE})
|
|
if (NOT ZLIB_FOUND)
|
|
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
|
|
set(ZLIB_USE_STATIC_LIBS ${HDF5_USE_ZLIB_STATIC})
|
|
endif()
|
|
find_package (ZLIB) # Legacy find
|
|
endif ()
|
|
set(H5_ZLIB_FOUND ${ZLIB_FOUND})
|
|
if (H5_ZLIB_FOUND)
|
|
set (H5_ZLIB_HEADER "zlib.h")
|
|
set (H5_ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
|
|
set (H5_ZLIB_INCLUDE_DIRS ${H5_ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
|
|
# The FindZLIB.cmake module does not set an OUTPUT_NAME
|
|
# on the target. The target returned is: ZLIB::ZLIB
|
|
get_filename_component (libname ${ZLIB_LIBRARIES} NAME_WLE)
|
|
string (REGEX REPLACE "^lib" "" libname ${libname})
|
|
set_target_properties (ZLIB::ZLIB PROPERTIES OUTPUT_NAME zlib-static)
|
|
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ZLIB::ZLIB)
|
|
endif ()
|
|
else ()
|
|
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
|
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
|
|
message (VERBOSE "Filter HDF5_ZLIB is built")
|
|
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_ZLIB_STATIC_LIBRARY})
|
|
endif ()
|
|
endif ()
|
|
else ()
|
|
# This project is being called from within another and ZLib is already configured
|
|
set(H5_ZLIB_FOUND TRUE)
|
|
endif ()
|
|
if (H5_ZLIB_FOUND)
|
|
set (H5_HAVE_FILTER_DEFLATE 1)
|
|
set (H5_HAVE_ZLIB_H 1)
|
|
set (H5_HAVE_LIBZ 1)
|
|
if (H5_HAVE_FILTER_DEFLATE)
|
|
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
|
|
endif ()
|
|
set (HDF5_COMP_INCLUDE_DIRECTORIES "${HDF5_COMP_INCLUDE_DIRECTORIES};${H5_ZLIB_INCLUDE_DIRS}")
|
|
message (VERBOSE "Filter HDF5_ZLIB is ON")
|
|
else ()
|
|
set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
|
|
message (WARNING " ZLib support in HDF5 was enabled but not found")
|
|
endif ()
|
|
endif ()
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Option for SzLib support
|
|
#-----------------------------------------------------------------------------
|
|
set(H5_SZIP_FOUND FALSE)
|
|
option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" ON)
|
|
if (HDF5_ENABLE_SZIP_SUPPORT)
|
|
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON)
|
|
if (NOT SZIP_USE_EXTERNAL)
|
|
if (HDF5_USE_LIBAEC_STATIC)
|
|
set(LIBAEC_SEACH_TYPE static)
|
|
else ()
|
|
set(LIBAEC_SEACH_TYPE shared)
|
|
endif ()
|
|
set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC})
|
|
set(SZIP_FOUND FALSE)
|
|
find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS ${LIBAEC_SEACH_TYPE})
|
|
if (NOT SZIP_FOUND)
|
|
find_package (SZIP) # Legacy find
|
|
endif ()
|
|
set(H5_SZIP_FOUND ${SZIP_FOUND})
|
|
if (H5_SZIP_FOUND)
|
|
set (H5_SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
|
|
set (H5_SZIP_INCLUDE_DIRS ${H5_SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR})
|
|
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
|
|
endif ()
|
|
else ()
|
|
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
|
|
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING})
|
|
message (VERBOSE "Filter SZIP is built")
|
|
message (VERBOSE "... with library AEC")
|
|
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_SZIP_STATIC_LIBRARY})
|
|
endif ()
|
|
endif ()
|
|
if (H5_SZIP_FOUND)
|
|
set (H5_HAVE_FILTER_SZIP 1)
|
|
set (H5_HAVE_SZLIB_H 1)
|
|
set (H5_HAVE_LIBSZ 1)
|
|
set (HDF5_COMP_INCLUDE_DIRECTORIES "${HDF5_COMP_INCLUDE_DIRECTORIES};${H5_SZIP_INCLUDE_DIRS}")
|
|
message (VERBOSE "Filter SZIP is ON")
|
|
if (H5_HAVE_FILTER_SZIP)
|
|
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
|
|
endif ()
|
|
if (HDF5_ENABLE_SZIP_ENCODING)
|
|
set (H5_HAVE_SZIP_ENCODER 1)
|
|
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
|
|
endif ()
|
|
else ()
|
|
set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
|
|
message (WARNING "SZIP support in HDF5 was enabled but not found")
|
|
endif ()
|
|
endif ()
|