summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-10-04 20:51:01 (GMT)
committerGitHub <noreply@github.com>2023-10-04 20:51:01 (GMT)
commit283202bc6268843a4a4c26e2c39020791e9af929 (patch)
tree775e2b132f3402656a3a06bf1eeb8a08373ce2a2
parentb1663686012d7c1cc10ef0792bf478442f2c0e7f (diff)
downloadhdf5-283202bc6268843a4a4c26e2c39020791e9af929.zip
hdf5-283202bc6268843a4a4c26e2c39020791e9af929.tar.gz
hdf5-283202bc6268843a4a4c26e2c39020791e9af929.tar.bz2
Remove old EXTERNALPROJECT_ADD in favor of FETCH_CONTENT (#3624)
-rw-r--r--.github/workflows/intel-cmake.yml2
-rw-r--r--.github/workflows/main-cmake.yml4
-rw-r--r--CMakeFilters.cmake59
-rw-r--r--CMakeLists.txt7
-rw-r--r--CMakePlugins.cmake28
-rw-r--r--CMakePresets.json26
-rw-r--r--config/cmake-presets/hidden-presets.json2
-rw-r--r--config/cmake/HDF5PluginCache.cmake8
-rw-r--r--config/cmake/HDF5PluginMacros.cmake23
-rw-r--r--config/cmake/HDFLibMacros.cmake158
-rw-r--r--config/cmake/cacheinit.cmake5
-rw-r--r--release_docs/INSTALL_CMake.txt35
-rw-r--r--release_docs/RELEASE.txt12
13 files changed, 111 insertions, 258 deletions
diff --git a/.github/workflows/intel-cmake.yml b/.github/workflows/intel-cmake.yml
index 7800214..4bdda03 100644
--- a/.github/workflows/intel-cmake.yml
+++ b/.github/workflows/intel-cmake.yml
@@ -58,9 +58,7 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=config/toolchain/intel.cmake \
-DMKL_ROOT="/opt/intel/oneapi/mkl/latest" \
-DTBB_ROOT="/opt/intel/oneapi/tbb/latest" \
- -DBUILD_SZIP_WITH_FETCHCONTENT=ON \
-DLIBAEC_USE_LOCALCONTENT=OFF \
- -DBUILD_ZLIB_WITH_FETCHCONTENT=ON \
-DZLIB_USE_LOCALCONTENT=OFF \
-DHDF5_BUILD_FORTRAN=OFF \
$GITHUB_WORKSPACE
diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml
index 7327d2a..0bf383b 100644
--- a/.github/workflows/main-cmake.yml
+++ b/.github/workflows/main-cmake.yml
@@ -184,9 +184,7 @@ jobs:
-DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} \
-DHDF5_BUILD_JAVA=${{ matrix.java }} \
-DHDF5_BUILD_DOC=${{ matrix.docs }} \
- -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 }} \
@@ -213,9 +211,7 @@ jobs:
-DHDF5_BUILD_JAVA:BOOL=OFF \
-DHDF5_BUILD_HL_LIB:BOOL=OFF \
-DHDF5_BUILD_DOC=OFF \
- -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 }} \
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index 78f98db..53cf539 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -13,30 +13,24 @@ option (USE_LIBAEC_STATIC "Use static AEC library " OFF)
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0)
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0)
-option (BUILD_ZLIB_WITH_FETCHCONTENT "Use FetchContent to use original source files" OFF)
-if (BUILD_ZLIB_WITH_FETCHCONTENT)
- set (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
- if (NOT ZLIB_USE_LOCALCONTENT)
- set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_ORIGNAME})
- else ()
- set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_ORIGNAME})
- endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Filter ZLIB file is ${ZLIB_URL}")
- endif ()
+set (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
+if (NOT ZLIB_USE_LOCALCONTENT)
+ set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_ORIGNAME})
+else ()
+ set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_ORIGNAME})
+endif ()
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Filter ZLIB file is ${ZLIB_URL}")
endif ()
-option (BUILD_SZIP_WITH_FETCHCONTENT "Use FetchContent to use original source files" OFF)
-if (BUILD_SZIP_WITH_FETCHCONTENT)
- set (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
- if (NOT LIBAEC_USE_LOCALCONTENT)
- set (SZIP_URL ${LIBAEC_TGZ_ORIGPATH}/${LIBAEC_TGZ_ORIGNAME})
- else ()
- set (SZIP_URL ${TGZPATH}/${LIBAEC_TGZ_ORIGNAME})
- endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Filter SZIP file is ${SZIP_URL}")
- endif ()
+set (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
+if (NOT LIBAEC_USE_LOCALCONTENT)
+ set (SZIP_URL ${LIBAEC_TGZ_ORIGPATH}/${LIBAEC_TGZ_ORIGNAME})
+else ()
+ set (SZIP_URL ${TGZPATH}/${LIBAEC_TGZ_ORIGNAME})
+endif ()
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Filter SZIP file is ${SZIP_URL}")
endif ()
include (ExternalProject)
@@ -55,18 +49,12 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
if (NOT TGZPATH)
set (TGZPATH ${HDF5_SOURCE_DIR})
endif ()
- if (NOT BUILD_ZLIB_WITH_FETCHCONTENT)
- set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
- 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 (NOT BUILD_SZIP_WITH_FETCHCONTENT)
- set (SZIP_URL ${TGZPATH}/${SZAEC_TGZ_NAME})
- endif ()
if (LIBAEC_USE_LOCALCONTENT)
if (NOT EXISTS "${SZIP_URL}")
set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
@@ -97,12 +85,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES})
endif ()
else ()
- if (BUILD_ZLIB_WITH_FETCHCONTENT)
- # Only tgz files available
- ORIGINAL_ZLIB_LIBRARY ("TGZ")
- message (VERBOSE "HDF5_ZLIB is built from fetch content")
- set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY})
- elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ 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} ${ZLIB_STATIC_LIBRARY})
@@ -153,13 +136,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
endif ()
else ()
- if (BUILD_SZIP_WITH_FETCHCONTENT)
- # Only tgz files available
- ORIGINAL_SZIP_LIBRARY ("TGZ" ${HDF5_ENABLE_SZIP_ENCODING})
- message (VERBOSE "SZIP is built from fetch content")
- message (VERBOSE "... with library AEC")
- set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY})
- elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ 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")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa91dbe..d5fe85a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -855,13 +855,6 @@ option (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF)
if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (HDF5_PACKAGE_EXTLIBS)
set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
- if (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND AND NOT BUILD_ZLIB_WITH_FETCHCONTENT)
- PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
- endif ()
-
- if (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND AND NOT BUILD_SZIP_WITH_FETCHCONTENT)
- PACKAGE_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
- endif ()
endif ()
endif ()
diff --git a/CMakePlugins.cmake b/CMakePlugins.cmake
index 16fb874..726bc29 100644
--- a/CMakePlugins.cmake
+++ b/CMakePlugins.cmake
@@ -9,27 +9,41 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
+option (PLUGIN_USE_EXTERNAL "Use External Library Building for filter PLUGIN" 0)
+
+set (PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGIN" 1)
+if (NOT PLUGIN_USE_LOCALCONTENT)
+ set (PLUGIN_URL ${PLUGIN_TGZ_ORIGPATH}/${PLUGIN_TGZ_ORIGNAME})
+else ()
+ if (NOT H5PL_TGZPATH)
+ set (H5PL_TGZPATH ${TGZPATH})
+ endif ()
+ set (PLUGIN_URL ${H5PL_TGZPATH}/${PLUGIN_TGZ_ORIGNAME})
+endif ()
+message (STATUS "Filter PLUGIN file is ${PLUGIN_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")
- option (PLUGIN_USE_EXTERNAL "Use External Library Building for filter PLUGIN" 1)
+ set (PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGIN" 1)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (PLUGIN_URL ${PLUGIN_GIT_URL} CACHE STRING "Path to PLUGIN git repository")
set (PLUGIN_BRANCH ${PLUGIN_GIT_BRANCH})
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- if (NOT TGZPATH)
- set (TGZPATH ${HDF5_SOURCE_DIR})
+ if (NOT H5PL_TGZPATH)
+ set (H5PL_TGZPATH ${TGZPATH})
endif ()
- set (PLUGIN_URL ${TGZPATH}/${PLUGIN_TGZ_NAME})
- if (NOT EXISTS "${PLUGIN_URL}")
- set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE)
- message (STATUS "Filter PLUGIN file ${PLUGIN_URL} not found")
+ if (PLUGIN_USE_LOCALCONTENT)
+ if (NOT EXISTS "${PLUGIN_URL}")
+ set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE)
+ message (VERBOSE "Filter PLUGIN file ${PLUGIN_URL} not found")
+ endif ()
endif ()
else ()
set (PLUGIN_USE_EXTERNAL 0)
+ message (VERBOSE "Filter PLUGIN not built")
endif ()
endif ()
diff --git a/CMakePresets.json b/CMakePresets.json
index 6fe2fd0..e73cb00 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -9,19 +9,17 @@
"hidden": true,
"inherits": "ci-base",
"cacheVariables": {
- "HDF5_ALLOW_EXTERNAL_SUPPORT": "NO",
- "TGZPATH": {"type": "STRING", "value": "${sourceParentDir}/temp"}
+ "HDF5_ALLOW_EXTERNAL_SUPPORT": {"type": "STRING", "value": "TGZ"},
+ "TGZPATH": {"type": "PATH", "value": "${sourceParentDir}/temp"}
}
},
{
"name": "ci-CompressionVars",
"hidden": true,
"cacheVariables": {
- "BUILD_ZLIB_WITH_FETCHCONTENT": "ON",
"ZLIB_PACKAGE_NAME": {"type": "STRING", "value": "zlib"},
"ZLIB_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/madler/zlib/releases/download/v1.2.13"},
"ZLIB_TGZ_ORIGNAME": {"type": "STRING", "value": "zlib-1.2.13.tar.gz"},
- "BUILD_SZIP_WITH_FETCHCONTENT": "ON",
"LIBAEC_PACKAGE_NAME": {"type": "STRING", "value": "libaec"},
"LIBAEC_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6"},
"LIBAEC_TGZ_ORIGNAME": {"type": "STRING", "value": "libaec-1.0.6.tar.gz"}
@@ -41,8 +39,7 @@
"name": "ci-base-plugins",
"hidden": true,
"cacheVariables": {
- "PLUGIN_TGZ_NAME": {"type": "STRING", "value": "hdf5_plugins.tar.gz"},
- "PLUGIN_PACKAGE_NAME": {"type": "STRING", "value": "pl"},
+ "PLUGIN_TGZ_NAME": {"type": "STRING", "value": "hdf5_plugins-master.tar.gz"},
"BSHUF_TGZ_NAME": {"type": "STRING", "value": "bitshuffle.tar.gz"},
"BSHUF_PACKAGE_NAME": {"type": "STRING", "value": "bshuf"},
"BLOSC_TGZ_NAME": {"type": "STRING", "value": "c-blosc.tar.gz"},
@@ -73,21 +70,26 @@
"hidden": true,
"cacheVariables": {
"HDF5_ENABLE_PLUGIN_SUPPORT": "ON",
- "PLUGIN_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/HDFGroup/hdf5_plugins/archive/refs/tags"},
+ "H5PL_ALLOW_EXTERNAL_SUPPORT": {"type": "STRING", "value": "TGZ"},
+ "PLUGIN_PACKAGE_NAME": {"type": "STRING", "value": "pl"},
+ "PLUGIN_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/HDFGroup/hdf5_plugins/releases/download/snapshots"},
"PLUGIN_TGZ_ORIGNAME": {"type": "STRING", "value": "hdf5_plugins-master.tar.gz"}
}
},
{
"name": "ci-StdPlugins",
"hidden": true,
- "inherits": ["ci-base-plugins", "ci-PluginsVars", "ci-base-tgz"]
+ "inherits": ["ci-base-plugins", "ci-PluginsVars", "ci-base-tgz"],
+ "cacheVariables": {
+ "PLUGIN_USE_LOCALCONTENT": "OFF"
+ }
},
{
"name": "ci-ExamplesVars",
"hidden": true,
"cacheVariables": {
- "HDF5_EXAMPLES_COMPRESSED": {"type": "STRING", "value": "hdf5-examples-2.0.4.tar.gz"},
- "HDF5_EXAMPLES_COMPRESSED_DIR": {"type": "STRING", "value": "${sourceParentDir}/temp"},
+ "HDF5_EXAMPLES_COMPRESSED": {"type": "STRING", "value": "hdf5-examples-master.tar.gz"},
+ "HDF5_EXAMPLES_COMPRESSED_DIR": {"type": "PATH", "value": "${sourceParentDir}/temp"},
"EXAMPLES_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/HDFGroup/hdf5-examples/archive/refs/tags/"},
"EXAMPLES_TGZ_ORIGNAME": {"type": "STRING", "value": "2.0.4.tar.gz"}
}
@@ -106,7 +108,7 @@
{
"name": "ci-StdShar",
"hidden": true,
- "inherits": ["ci-StdCompression", "ci-StdExamples"],
+ "inherits": ["ci-StdCompression", "ci-StdExamples", "ci-StdPlugins"],
"cacheVariables": {
"HDF_PACKAGE_NAMESPACE": {"type": "STRING", "value": "hdf5::"},
"HDF5_INSTALL_MOD_FORTRAN": "NO",
@@ -181,7 +183,7 @@
"name": "ci-StdShar-GNUC",
"description": "GNUC Standard Build for x64 (Release)",
"configurePreset": "ci-StdShar-GNUC",
- "verbose": false,
+ "verbose": true,
"inherits": [
"ci-x64-Release-GNUC"
]
diff --git a/config/cmake-presets/hidden-presets.json b/config/cmake-presets/hidden-presets.json
index 18ffdd1..bd36153 100644
--- a/config/cmake-presets/hidden-presets.json
+++ b/config/cmake-presets/hidden-presets.json
@@ -100,7 +100,7 @@
"name": "ci-Fortran-Clang",
"hidden": true,
"cacheVariables": {
- "CMAKE_Fortran_COMPILER": "gfortran"
+ "CMAKE_Fortran_COMPILER": {"type": "FILEPATH", "value": "gfortran"}
},
"condition": {
"type": "matches",
diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake
index 0d1795d..34a97d5 100644
--- a/config/cmake/HDF5PluginCache.cmake
+++ b/config/cmake/HDF5PluginCache.cmake
@@ -18,7 +18,13 @@ set (H5PL_HDF5_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE STRING "HDF5 build folder"
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)
+if (NOT DEFINED H5PL_ALLOW_EXTERNAL_SUPPORT)
+ set (H5PL_ALLOW_EXTERNAL_SUPPORT "${HDF5_ALLOW_EXTERNAL_SUPPORT}" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
+endif ()
+
+if (NOT DEFINED H5PL_TGZPATH)
+ set (H5PL_TGZPATH "${TGZPATH}" CACHE PATH "PATH for finding plugin tgz file" FORCE)
+endif ()
set (H5PL_GIT_URL "https://github.com/HDFGroup/hdf5_plugins.git" CACHE STRING "Use plugins from HDF Group repository" FORCE)
set (H5PL_GIT_BRANCH "master" CACHE STRING "" FORCE)
diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake
index da0eab5..aa409f7 100644
--- a/config/cmake/HDF5PluginMacros.cmake
+++ b/config/cmake/HDF5PluginMacros.cmake
@@ -1,3 +1,14 @@
+#
+# 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.
+#
#-------------------------------------------------------------------------------
# Plugins must be built SHARED
#-------------------------------------------------------------------------------
@@ -85,16 +96,16 @@ macro (FILTER_OPTION plname)
if (ENABLE_${plname})
option (HDF_${plname}_USE_EXTERNAL "Use External Library Building for ${PLUGIN_NAME} plugin" 0)
mark_as_advanced (HDF_${plname}_USE_EXTERNAL)
- if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ if (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
set (HDF_${plname}_USE_EXTERNAL 1 CACHE BOOL "Use External Library Building for ${PLUGIN_NAME} plugin" FORCE)
- if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
+ if (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (HDF_${plname}_URL ${HDF_${plname}_GIT_URL})
set (HDF_${plname}_BRANCH ${HDF_${plname}_GIT_BRANCH})
- elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- if (NOT TGZPATH)
- set (TGZPATH ${H5PL_SOURCE_DIR})
+ elseif (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ if (NOT H5PL_COMP_TGZPATH)
+ set (H5PL_COMP_TGZPATH ${H5PL_SOURCE_DIR}/libs)
endif ()
- set (HDF_${plname}_URL ${TGZPATH}/${HDF_${plname}_TGZ_NAME})
+ set (HDF_${plname}_URL ${H5PL_COMP_TGZPATH}/${HDF_${plname}_TGZ_NAME})
endif ()
endif ()
add_subdirectory (${plname})
diff --git a/config/cmake/HDFLibMacros.cmake b/config/cmake/HDFLibMacros.cmake
index 8737b77..4039a50 100644
--- a/config/cmake/HDFLibMacros.cmake
+++ b/config/cmake/HDFLibMacros.cmake
@@ -10,7 +10,7 @@
# help@hdfgroup.org.
#
#-------------------------------------------------------------------------------
-macro (ORIGINAL_ZLIB_LIBRARY compress_type)
+macro (EXTERNAL_ZLIB_LIBRARY compress_type)
if (${compress_type} MATCHES "GIT")
FetchContent_Declare (HDF5_ZLIB
GIT_REPOSITORY ${ZLIB_URL}
@@ -44,7 +44,7 @@ macro (ORIGINAL_ZLIB_LIBRARY compress_type)
endmacro ()
#-------------------------------------------------------------------------------
-macro (ORIGINAL_SZIP_LIBRARY compress_type encoding)
+macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
# Only libaec library is usable
if (${compress_type} MATCHES "GIT")
FetchContent_Declare (SZIP
@@ -78,157 +78,3 @@ macro (ORIGINAL_SZIP_LIBRARY compress_type encoding)
set (SZIP_FOUND 1)
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
endmacro ()
-
-#-------------------------------------------------------------------------------
-macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
- if (${compress_type} MATCHES "GIT")
- EXTERNALPROJECT_ADD (SZIP
- GIT_REPOSITORY ${SZIP_URL}
- GIT_TAG ${SZIP_BRANCH}
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=OFF
- -DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
- -DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
- -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- -DHDF_USE_GNU_DIRS:STRING=${HDF5_USE_GNU_DIRS}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
- -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
- )
- elseif (${compress_type} MATCHES "TGZ")
- EXTERNALPROJECT_ADD (SZIP
- URL ${SZIP_URL}
- URL_MD5 ""
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=OFF
- -DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
- -DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
- -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- -DHDF_USE_GNU_DIRS:STRING=${HDF5_USE_GNU_DIRS}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
- -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
- )
- endif ()
- externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR)
-#
-##include (${BINARY_DIR}/${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
-# Create imported target szip-static
- add_library(${HDF_PACKAGE_NAMESPACE}szaec-static STATIC IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}szaec-static "szaec" STATIC "")
- add_dependencies (${HDF_PACKAGE_NAMESPACE}szaec-static SZIP)
- add_library(${HDF_PACKAGE_NAMESPACE}aec-static STATIC IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}aec-static "aec" STATIC "")
- add_dependencies (${HDF_PACKAGE_NAMESPACE}aec-static SZIP)
- set (SZIP_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}szaec-static;${HDF_PACKAGE_NAMESPACE}aec-static")
- set (SZIP_LIBRARIES ${SZIP_STATIC_LIBRARY})
-
- set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}")
- set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/include")
- set (SZIP_FOUND 1)
- set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
-endmacro ()
-
-#-------------------------------------------------------------------------------
-macro (PACKAGE_SZIP_LIBRARY compress_type)
- add_custom_target (SZIP-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_INCLUDE_DIR_GEN}/aec_config.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/aec_config.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
- )
- set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/aec_config.h)
- if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
- add_dependencies (SZIP-GenHeader-Copy SZIP)
- endif ()
-endmacro ()
-
-#-------------------------------------------------------------------------------
-macro (EXTERNAL_ZLIB_LIBRARY compress_type)
- if (${compress_type} MATCHES "GIT")
- EXTERNALPROJECT_ADD (HDF5_ZLIB
- GIT_REPOSITORY ${ZLIB_URL}
- GIT_TAG ${ZLIB_BRANCH}
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=OFF
- -DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
- -DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
- -DHDF_USE_GNU_DIRS:STRING=${HDF5_USE_GNU_DIRS}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
- -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
- )
- elseif (${compress_type} MATCHES "TGZ")
- EXTERNALPROJECT_ADD (HDF5_ZLIB
- URL ${ZLIB_URL}
- URL_MD5 ""
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=OFF
- -DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${HDF_CFG_NAME}
- -DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
- -DHDF_USE_GNU_DIRS:STRING=${HDF5_USE_GNU_DIRS}
- -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
- -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
- -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
- )
- endif ()
- externalproject_get_property (HDF5_ZLIB BINARY_DIR SOURCE_DIR)
-
- if (NOT ZLIB_LIB_NAME)
- set (ZLIB_LIB_NAME "z")
- endif ()
-##include (${BINARY_DIR}/${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
-# Create imported target zlib-static
- add_library(${HDF_PACKAGE_NAMESPACE}zlib-static STATIC IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}zlib-static ${ZLIB_LIB_NAME} STATIC "")
- add_dependencies (${HDF_PACKAGE_NAMESPACE}zlib-static HDF5_ZLIB)
- set (ZLIB_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}zlib-static")
- set (ZLIB_LIBRARIES ${ZLIB_STATIC_LIBRARY})
-
- set (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}")
- set (ZLIB_INCLUDE_DIR "${SOURCE_DIR}")
- set (ZLIB_FOUND 1)
- set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR_GEN} ${ZLIB_INCLUDE_DIR})
-endmacro ()
-
-#-------------------------------------------------------------------------------
-macro (PACKAGE_ZLIB_LIBRARY compress_type)
- add_custom_target (ZLIB-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_INCLUDE_DIR_GEN}/zconf.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${ZLIB_INCLUDE_DIR_GEN}/zconf.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
- )
- set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h)
- if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
- add_dependencies (ZLIB-GenHeader-Copy HDF5_ZLIB)
- endif ()
-endmacro ()
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index ad61584..1f784a7 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -70,8 +70,9 @@ set (KWSYS_USE_LOCALCONTENT OFF CACHE BOOL "Use local file for KWSYS FetchConten
# filter plugin options
########################
-set (PLUGIN_TGZ_NAME "hdf5_plugins.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE)
-
+set (PLUGIN_TGZ_ORIGPATH "https://github.com/HDFGroup/hdf5_plugins/releases/download/snapshots" CACHE STRING "Use PLUGINS from original location" FORCE)
+set (PLUGIN_TGZ_ORIGNAME "hdf5_plugins-master.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE)
+set (PLUGIN_USE_LOCALCONTENT ON CACHE BOOL "Use local file for PLUGIN FetchContent" FORCE)
set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE)
#############
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index f979ff3..a6306eb 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -316,11 +316,9 @@ IV. Further considerations
D. Use original source packages from a compressed file by adding the following
CMake options:
- BUILD_SZIP_WITH_FETCHCONTENT:BOOL=ON
LIBAEC_TGZ_ORIGNAME:STRING="szip_src.ext"
LIBAEC_TGZ_ORIGPATH:STRING="some_location"
- BUILD_ZLIB_WITH_FETCHCONTENT:BOOL=ON
ZLIB_TGZ_ORIGNAME:STRING="zlib_src.ext"
ZLIB_TGZ_ORIGPATH:STRING="some_location"
@@ -329,8 +327,6 @@ IV. Further considerations
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.
@@ -878,24 +874,25 @@ HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)"
HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF
HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" ON
HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON
-PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGINS" 0
+
ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0
+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" ON
+
SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0
if (HDF5_ENABLE_SZIP_SUPPORT)
HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON
+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" ON
+
+PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGINS" 0
if (WINDOWS)
H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin"
else ()
H5_DEFAULT_PLUGINDIR "/usr/local/hdf5/lib/plugin"
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" 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" ON
NOTE:
The BUILD_STATIC_EXECS ("Build Static Executables") option is only valid
@@ -1060,15 +1057,15 @@ Available configurations presets can be displayed by executing:
Using individual command presets (where <compiler-type> is GNUC or MSVC or Clang):
change directory to the hdf5 source folder
- cmake --presets=ci-StdShar-<compiler-type>
- cmake --build --presets=ci-StdShar-<compiler-type>
- ctest --presets=ci-StdShar-<compiler-type>
- cpack --presets=ci-StdShar-<compiler-type>
+ cmake --preset ci-StdShar-<compiler-type>
+ cmake --build --preset ci-StdShar-<compiler-type>
+ ctest --preset ci-StdShar-<compiler-type>
+ cpack --preset ci-StdShar-<compiler-type>
Using the workflow preset to configure, build, test and package the standard configuration is:
change directory to the hdf5 source folder
- execute "cmake --workflow --presets=ci-StdShar-<compiler-type> --fresh"
+ execute "cmake --workflow --preset ci-StdShar-<compiler-type> --fresh"
where <compiler-type> is GNUC or MSVC or Clang
Creating your own configurations
@@ -1088,7 +1085,7 @@ For instance, to change the support files to use a local directory, edit CMakeUs
"inherits": "ci-base",
"cacheVariables": {
"HDF5_ALLOW_EXTERNAL_SUPPORT": {"type": "STRING", "value": "TGZ"},
- "TGZPATH": {"type": "STRING", "value": "${sourceParentDir}/temp"}
+ "TGZPATH": {"type": "PATH", "value": "${sourceParentDir}/temp"}
}
},
{
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 4214631..d266877 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -47,6 +47,18 @@ New Features
Configuration:
-------------
+ - Converted the build of libaec and zlib to use FETCH_CONTENT with CMake.
+
+ Using the CMake FetchContent module, the external filters can populate
+ content at configure time via any method supported by the ExternalProject
+ module. Whereas ExternalProject_Add() downloads at build time, the
+ FetchContent module makes content available immediately, allowing the
+ configure step to use the content in commands like add_subdirectory(),
+ include() or file() operations.
+
+ Removed HDF options for using FETCH_CONTENT explicitly:
+ BUILD_SZIP_WITH_FETCHCONTENT:BOOL
+ BUILD_ZLIB_WITH_FETCHCONTENT:BOOL
- Thread-safety + static library disabled on Windows w/ CMake
The thread-safety feature requires hooks in DllMain(), which is only