summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-05-22 23:04:48 (GMT)
committerGitHub <noreply@github.com>2023-05-22 23:04:48 (GMT)
commit8186a8ded043b383004160ec4ad239687c60d5dd (patch)
tree3f5eadbdd06bdf2f3e449c6760246a49122a154a
parent5c2e434dc630d6e333aa4118c20d67b80df2173d (diff)
downloadhdf5-8186a8ded043b383004160ec4ad239687c60d5dd.zip
hdf5-8186a8ded043b383004160ec4ad239687c60d5dd.tar.gz
hdf5-8186a8ded043b383004160ec4ad239687c60d5dd.tar.bz2
Fix plugin cache variable name (#2988)
* Fix plugin cache variable name * Prefix plugin project local variables
-rw-r--r--.github/workflows/main.yml8
-rw-r--r--config/cmake/HDF5PluginCache.cmake18
-rw-r--r--config/cmake/cacheinit.cmake4
-rw-r--r--release_docs/INSTALL_CMake.txt20
-rw-r--r--release_docs/RELEASE.txt6
5 files changed, 34 insertions, 22 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 8892588..c5d2d42 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -82,7 +82,9 @@ jobs:
fortran: OFF
java: ON
libaecfc: ON
+ localaec: OFF
zlibfc: ON
+ localzlib: OFF
parallel: OFF
mirror_vfd: OFF
direct_vfd: OFF
@@ -99,7 +101,9 @@ jobs:
fortran: ON
java: ON
libaecfc: ON
+ localaec: OFF
zlibfc: ON
+ localzlib: OFF
parallel: OFF
mirror_vfd: ON
direct_vfd: ON
@@ -158,7 +162,9 @@ jobs:
fortran: OFF
java: ON
libaecfc: ON
+ localaec: OFF
zlibfc: ON
+ localzlib: OFF
parallel: OFF
mirror_vfd: ON
direct_vfd: OFF
@@ -499,7 +505,7 @@ jobs:
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
- cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE
+ cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE
shell: bash
if: (matrix.generator != 'autogen') && (! matrix.thread_safe.enabled)
diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake
index e676919..0d1795d 100644
--- a/config/cmake/HDF5PluginCache.cmake
+++ b/config/cmake/HDF5PluginCache.cmake
@@ -8,15 +8,15 @@
set (H5PL_BUILD_TESTING ON CACHE BOOL "Enable H5PL testing" FORCE)
set (BUILD_EXAMPLES ON CACHE BOOL "Build H5PL Examples" FORCE)
-set (HDF5_HDF5_HEADER "H5pubconf.h" CACHE STRING "Name of HDF5 header" FORCE)
-set (HDF5_LINK_LIBS ${HDF5_LIBSH_TARGET} CACHE STRING "HDF5 target" FORCE)
-#set (HDF5_INCLUDE_DIR $<TARGET_PROPERTY:${HDF5_LIBSH_TARGET},INCLUDE_DIRECTORIES> CACHE PATH "HDF5 include dirs" FORCE)
-set (HDF5_INCLUDE_DIR "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}" CACHE PATH "HDF5 include dirs" FORCE)
-set (HDF5_INCLUDE_DIRS "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}" CACHE PATH "HDF5 include dirs" FORCE)
-set (HDF5_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE STRING "HDF5 build folder" FORCE)
-
-set (HDF5_DUMP_EXECUTABLE $<TARGET_FILE:h5dump-shared> CACHE STRING "HDF5 h5dump target" FORCE)
-set (HDF5_REPACK_EXECUTABLE $<TARGET_FILE:h5repack-shared> CACHE STRING "HDF5 h5repack target" FORCE)
+#preset HDF5 cache vars to this projects libraries instead of searching
+set (H5PL_HDF5_HEADER "H5pubconf.h" CACHE STRING "Name of HDF5 header" FORCE)
+set (H5PL_HDF5_LINK_LIBS ${HDF5_LIBSH_TARGET} CACHE STRING "HDF5 target" FORCE)
+#set (H5PL_HDF5_INCLUDE_DIRS $<TARGET_PROPERTY:${HDF5_LIBSH_TARGET},INCLUDE_DIRECTORIES> CACHE PATH "HDF5 include dirs" FORCE)
+set (H5PL_HDF5_INCLUDE_DIRS "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}" CACHE PATH "HDF5 include dirs" FORCE)
+set (H5PL_HDF5_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE STRING "HDF5 build folder" FORCE)
+
+set (H5PL_HDF5_DUMP_EXECUTABLE $<TARGET_FILE:h5dump-shared> CACHE STRING "HDF5 h5dump target" FORCE)
+set (H5PL_HDF5_REPACK_EXECUTABLE $<TARGET_FILE:h5repack-shared> CACHE STRING "HDF5 h5repack target" FORCE)
set (H5PL_ALLOW_EXTERNAL_SUPPORT "${HDF5_ALLOW_EXTERNAL_SUPPORT}" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index 6ca1080..ad61584 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -51,13 +51,13 @@ set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE)
set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.2.13" CACHE STRING "Use ZLIB from original location" FORCE)
set (ZLIB_TGZ_ORIGNAME "zlib-1.2.13.tar.gz" CACHE STRING "Use ZLIB from original compressed file" FORCE)
-set (ZLIB_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for ZLIB FetchContent" FORCE)
+set (ZLIB_USE_LOCALCONTENT ON CACHE BOOL "Use local file for ZLIB FetchContent" FORCE)
set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
set (SZAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6" CACHE STRING "Use LIBAEC from original location" FORCE)
set (LIBAEC_TGZ_ORIGNAME "libaec-1.0.6.tar.gz" CACHE STRING "Use LIBAEC from original compressed file" FORCE)
-set (LIBAEC_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE)
+set (LIBAEC_USE_LOCALCONTENT ON CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE)
########################
# API test options
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index 766819a..1ec7615 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -325,17 +325,17 @@ IV. Further considerations
ZLIB_TGZ_ORIGPATH:STRING="some_location"
HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="TGZ"
- where "some_location" is the URL or full path to the compressed
- file and ext is the type of compression file. The individual filters are
- enabled by setting the BUILD_<filter>_WITH_FETCHCONTENT CMake variable to ON.
+ where "some_location" is the URL and by setting
+ ZLIB_USE_LOCALCONTENT:BOOL=OFF
+ LIBAEC_USE_LOCALCONTENT:BOOL=OFF
+ or full path to the compressed file and ext is the type of compression file.
+ The individual filters are enabled by setting the BUILD_<filter>_WITH_FETCHCONTENT
+ CMake variable to ON.
Also set CMAKE_BUILD_TYPE to the configuration type during configuration.
See the settings in the config/cmake/cacheinit.cmake file HDF uses for testing.
The files can also be retrieved from a local path if necessary
TGZPATH:STRING="some_location"
- by setting
- ZLIB_USE_LOCALCONTENT:BOOL=ON
- LIBAEC_USE_LOCALCONTENT:BOOL=ON
3. If you plan to use compression plugins:
A. Use source packages from an GIT server by adding the following CMake
@@ -530,12 +530,12 @@ These five steps are described in detail below.
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE)
set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.2.13" CACHE STRING "Use ZLIB from original location" FORCE)
set (ZLIB_TGZ_ORIGNAME "zlib-1.2.13.tar.gz" CACHE STRING "Use ZLIB from original compressed file" FORCE)
- set (ZLIB_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for ZLIB FetchContent" FORCE)
+ set (ZLIB_USE_LOCALCONTENT ON CACHE BOOL "Use local file for ZLIB FetchContent" FORCE)
set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
set (SZAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6" CACHE STRING "Use LIBAEC from original location" FORCE)
set (LIBAEC_TGZ_ORIGNAME "libaec-1.0.6.tar.gz" CACHE STRING "Use LIBAEC from original compressed file" FORCE)
- set (LIBAEC_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE)
+ set (LIBAEC_USE_LOCALCONTENT ON CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE)
#######################
# filter plugin options
#######################
@@ -892,11 +892,11 @@ endif ()
if (BUILD_SZIP_WITH_FETCHCONTENT)
LIBAEC_TGZ_ORIGPATH "Use LIBAEC from original location" "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6/libaec-1.0.6.tar.gz"
LIBAEC_TGZ_ORIGNAME "Use LIBAEC from original compressed file" "libaec-v1.0.6.tar.gz"
- LIBAEC_USE_LOCALCONTENT "Use local file for LIBAEC FetchContent" OFF
+ LIBAEC_USE_LOCALCONTENT "Use local file for LIBAEC FetchContent" ON
if (BUILD_ZLIB_WITH_FETCHCONTENT)
ZLIB_TGZ_ORIGPATH "Use ZLIB from original location" "https://github.com/madler/zlib/releases/download/v1.2.13"
ZLIB_TGZ_ORIGNAME "Use ZLIB from original compressed file" "zlib-1.2.13.tar.gz"
- ZLIB_USE_LOCALCONTENT "Use local file for ZLIB FetchContent" OFF
+ ZLIB_USE_LOCALCONTENT "Use local file for ZLIB FetchContent" ON
NOTE:
The BUILD_STATIC_EXECS ("Build Static Executables") option is only valid
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index f6d95b8..85a1db2 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -422,6 +422,12 @@ Bug Fixes since HDF5-1.14.0 release
changed from FATAL_ERROR (which would halt the build process) to WARNING (which
will print a message to stderr). Associated files and documentation were changed to match.
+ In addition, the default settings in the config/cmake/cacheinit.cmake file were changed to
+ allow CMake to disable building the filters if the tgz file could not be found. The option
+ to allow CMake to download the file from the original Github location requires setting
+ the ZLIB_USE_LOCALCONTENT option to OFF for gzip. And setting the LIBAEC_USE_LOCALCONTENT
+ option to OFF for libaec (szip).
+
Fixes GitHub issue #2926
- Fixed syntax of generator expressions used by CMake