summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/cmake/HDF5PluginMacros.cmake146
-rw-r--r--config/cmake/HDF5_Examples_options.cmake4
-rw-r--r--config/cmake/cacheinit.cmake126
-rw-r--r--config/cmake/hdf5-config.cmake.in1
-rw-r--r--config/cmake_ext_mod/HDFLibMacros.cmake15
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake13
6 files changed, 303 insertions, 2 deletions
diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake
new file mode 100644
index 0000000..3cded02
--- /dev/null
+++ b/config/cmake/HDF5PluginMacros.cmake
@@ -0,0 +1,146 @@
+#-------------------------------------------------------------------------------
+# Plugins must be built SHARED
+#-------------------------------------------------------------------------------
+macro (EXTERNAL_PLUGIN_LIBRARY compress_type)
+ if (${compress_type} MATCHES "GIT")
+ EXTERNALPROJECT_ADD (PLUGIN
+ GIT_REPOSITORY ${PLUGIN_URL}
+ GIT_TAG ${PLUGIN_BRANCH}
+ LIST_SEPARATOR |
+ INSTALL_COMMAND ""
+ CMAKE_ARGS
+ -DUSE_SHARED_LIBS:BOOL=ON
+ -DBUILD_SHARED_LIBS:BOOL=ON
+ -DH5PL_ALLOW_EXTERNAL_SUPPORT:STRING=${HDF5_ALLOW_EXTERNAL_SUPPORT}
+ -DBUILD_TESTING:STRING=OFF
+ -DBUILD_EXAMPLES:STRING=OFF
+ -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+ -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}
+ -DDISABLE_PLUGIN_ENCODER:BOOL=OFF
+ -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
+ # the hdf5 settings
+ -DHDF5_PACKAGE_NAME:STRING=hdf5
+ -DHDF5_HDF5_HEADER:STRING=h5pubconf.h
+ -DHDF5_LINK_LIBS:STRING=$<TARGET_FILE:${HDF5_LIBSH_TARGET}>
+ -DHDF5_INCLUDE_DIR:PATH=${HDF5_SRC_DIR}|${HDF5_SRC_BINARY_DIR}
+ -DPL_PACKAGE_NAME:STRING=${PLUGIN_PACKAGE_NAME}
+ -DH5PL_CPACK_ENABLE:BOOL=ON
+ -DHDF5_DIR:STRING=${CMAKE_CURRENT_BINARY_DIR}
+ -DTGZPATH:PATH=${TGZPATH}
+ # the filters
+ -DBSHUF_TGZ_NAME:STRING=${BSHUF_TGZ_NAME}
+ -DBSHUF_PACKAGE_NAME:STRING=${BSHUF_PACKAGE_NAME}
+ -DBLOSC_TGZ_NAME:STRING=${BLOSC_TGZ_NAME}
+ -DBLOSC_PACKAGE_NAME:STRING=${BLOSC_PACKAGE_NAME}
+ -DZLIB_TGZ_NAME:STRING=${ZLIB_TGZ_NAME}
+ -DZLIB_PACKAGE_NAME:STRING=${ZLIB_PACKAGE_NAME}
+ -DBZ2_TGZ_NAME:STRING=${BZ2_TGZ_NAME}
+ -DBZ2_PACKAGE_NAME:STRING=${BZ2_PACKAGE_NAME}
+ #-DFPZIP_TGZ_NAME:STRING=${FPZIP_TGZ_NAME}
+ #-DFPZIP_PACKAGE_NAME:STRING=${FPZIP_PACKAGE_NAME}
+ -DJPEG_TGZ_NAME:STRING=${JPEG_TGZ_NAME}
+ -DJPEG_PACKAGE_NAME:STRING=${JPEG_PACKAGE_NAME}
+ -DLZ4_TGZ_NAME:STRING=${LZ4_TGZ_NAME}
+ -DLZ4_PACKAGE_NAME:STRING=${LZ4_PACKAGE_NAME}
+ -DLZF_TGZ_NAME:STRING=${LZF_TGZ_NAME}
+ -DLZF_PACKAGE_NAME:STRING=${LZF_PACKAGE_NAME}
+ #-DSZ_TGZ_NAME:STRING=${SZ_TGZ_NAME}
+ #-DSZ_PACKAGE_NAME:STRING=${SZ_PACKAGE_NAME}
+ -DZFP_TGZ_NAME:STRING=${ZFP_TGZ_NAME}
+ -DZFP_PACKAGE_NAME:STRING=${ZFP_PACKAGE_NAME}
+ )
+ elseif (${compress_type} MATCHES "TGZ")
+ EXTERNALPROJECT_ADD (PLUGIN
+ URL ${PLUGIN_URL}
+ URL_MD5 ""
+ LIST_SEPARATOR |
+ INSTALL_COMMAND ""
+ CMAKE_ARGS
+ -DUSE_SHARED_LIBS:BOOL=ON
+ -DBUILD_SHARED_LIBS:BOOL=ON
+ -DH5PL_ALLOW_EXTERNAL_SUPPORT:STRING=${HDF5_ALLOW_EXTERNAL_SUPPORT}
+ -DBUILD_TESTING:STRING=OFF
+ -DBUILD_EXAMPLES:STRING=OFF
+ -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+ -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}
+ -DDISABLE_PLUGIN_ENCODER:BOOL=OFF
+ -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
+ # the hdf5 settings
+ -DHDF5_PACKAGE_NAME:STRING=hdf5
+ -DHDF5_HDF5_HEADER:STRING=h5pubconf.h
+ -DHDF5_LINK_LIBS:STRING=$<TARGET_FILE:${HDF5_LIBSH_TARGET}>
+ -DHDF5_INCLUDE_DIR:PATH=${HDF5_SRC_DIR}|${HDF5_SRC_BINARY_DIR}
+ -DPL_PACKAGE_NAME:STRING=${PLUGIN_PACKAGE_NAME}
+ -DH5PL_CPACK_ENABLE:BOOL=ON
+ -DHDF5_DIR:STRING=${CMAKE_CURRENT_BINARY_DIR}
+ -DTGZPATH:PATH=${TGZPATH}
+ # the filters
+ -DBSHUF_TGZ_NAME:STRING=${BSHUF_TGZ_NAME}
+ -DBSHUF_PACKAGE_NAME:STRING=${BSHUF_PACKAGE_NAME}
+ -DBLOSC_TGZ_NAME:STRING=${BLOSC_TGZ_NAME}
+ -DBLOSC_PACKAGE_NAME:STRING=${BLOSC_PACKAGE_NAME}
+ -DZLIB_TGZ_NAME:STRING=${ZLIB_TGZ_NAME}
+ -DZLIB_PACKAGE_NAME:STRING=${ZLIB_PACKAGE_NAME}
+ -DBZ2_TGZ_NAME:STRING=${BZ2_TGZ_NAME}
+ -DBZ2_PACKAGE_NAME:STRING=${BZ2_PACKAGE_NAME}
+ #-DFPZIP_TGZ_NAME:STRING=${FPZIP_TGZ_NAME}
+ #-DFPZIP_PACKAGE_NAME:STRING=${FPZIP_PACKAGE_NAME}
+ -DJPEG_TGZ_NAME:STRING=${JPEG_TGZ_NAME}
+ -DJPEG_PACKAGE_NAME:STRING=${JPEG_PACKAGE_NAME}
+ -DLZ4_TGZ_NAME:STRING=${LZ4_TGZ_NAME}
+ -DLZ4_PACKAGE_NAME:STRING=${LZ4_PACKAGE_NAME}
+ -DLZF_TGZ_NAME:STRING=${LZF_TGZ_NAME}
+ -DLZF_PACKAGE_NAME:STRING=${LZF_PACKAGE_NAME}
+ #-DSZ_TGZ_NAME:STRING=${SZ_TGZ_NAME}
+ #-DSZ_PACKAGE_NAME:STRING=${SZ_PACKAGE_NAME}
+ -DZFP_TGZ_NAME:STRING=${ZFP_TGZ_NAME}
+ -DZFP_PACKAGE_NAME:STRING=${ZFP_PACKAGE_NAME}
+ )
+ endif ()
+ externalproject_get_property (PLUGIN BINARY_DIR SOURCE_DIR)
+ set (PLUGIN_BINARY_DIR "${BINARY_DIR}")
+
+# include (${BINARY_DIR}/PLUGIN-targets.cmake)
+ set (PLUGIN_LIBRARY "PLUGIN")
+ set (PLUGIN_FOUND 1)
+endmacro ()
+
+#-------------------------------------------------------------------------------
+macro (FILTER_OPTION plname)
+ string(TOLOWER ${plname} PLUGIN_NAME)
+ option (ENABLE_${plname} "Enable Library Building for ${plname} plugin" ON)
+ if (ENABLE_${plname})
+ option (HDF_${plname}_USE_EXTERNAL "Use External Library Building for ${PLUGIN_NAME} plugin" 0)
+ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_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")
+ 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})
+ endif ()
+ set (HDF_${plname}_URL ${TGZPATH}/${HDF_${plname}_TGZ_NAME})
+ endif ()
+ endif ()
+ add_subdirectory (${plname})
+ set_global_variable (H5PL_LIBRARIES_TO_EXPORT "${H5PL_LIBRARIES_TO_EXPORT};${H5${plname}_LIBRARIES_TO_EXPORT}")
+ endif ()
+endmacro ()
+
+#-------------------------------------------------------------------------------
+macro (PACKAGE_PLUGIN_LIBRARY compress_type)
+ if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
+ message (STATUS "Filter PLUGIN is to be packaged")
+ endif ()
+endmacro ()
diff --git a/config/cmake/HDF5_Examples_options.cmake b/config/cmake/HDF5_Examples_options.cmake
index 386e99c..dd85b3b 100644
--- a/config/cmake/HDF5_Examples_options.cmake
+++ b/config/cmake/HDF5_Examples_options.cmake
@@ -18,6 +18,7 @@
#### HDF_BUILD_CXX:BOOL=OFF ###
#### HDF_BUILD_FORTRAN:BOOL=OFF ###
#### HDF_BUILD_JAVA:BOOL=OFF ###
+#### HDF_BUILD_FILTERS:BOOL=OFF ###
#### BUILD_TESTING:BOOL=OFF ###
#### HDF_ENABLE_PARALLEL:BOOL=OFF ###
#### HDF_ENABLE_THREADSAFE:BOOL=OFF ###
@@ -41,6 +42,9 @@
### enable JAVA builds
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=ON")
+### enable FILTERS builds
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FILTERS:BOOL=ON")
+
#############################################################################################
### enable parallel program builds
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_ENABLE_PARALLEL:BOOL=ON")
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index 64e8dcc..926e230 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -44,7 +44,6 @@ set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Build
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
-
set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
set (SZAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
set (USE_LIBAEC ON CACHE BOOL "Use libaec szip replacement" FORCE)
@@ -52,3 +51,128 @@ set (USE_LIBAEC ON CACHE BOOL "Use libaec szip replacement" FORCE)
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
+
+#######################
+# filter plugin options
+#######################
+set (PLUGIN_TGZ_NAME "hdf5_plugins.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE)
+
+set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE)
+
+############
+# bitshuffle
+###########
+
+set (BSHUF_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/bitshuffle.git" CACHE STRING "Use BSHUF from HDF repository" FORCE)
+set (BSHUF_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (BSHUF_TGZ_NAME "bitshuffle.tar.gz" CACHE STRING "Use BSHUF from compressed file" FORCE)
+
+set (BSHUF_PACKAGE_NAME "bshuf" CACHE STRING "Name of BSHUF package" FORCE)
+
+#######
+# blosc
+#######
+
+set (BLOSC_GIT_URL "https://github.com/Blosc/c-blosc.git" CACHE STRING "Use BLOSC from Github" FORCE)
+set (BLOSC_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (BLOSC_TGZ_NAME "c-blosc.tar.gz" CACHE STRING "Use BLOSC from compressed file" FORCE)
+
+set (BLOSC_PACKAGE_NAME "blosc" CACHE STRING "Name of BLOSC package" FORCE)
+
+set (ZLIB_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/zlib.git" CACHE STRING "Use ZLIB from HDF repo" FORCE)
+set (ZLIB_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
+
+set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+
+#######
+# bzip2
+######
+#
+set (BZ2_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/bzip2.git" CACHE STRING "Use BZ2 from HDF repository" FORCE)
+set (BZ2_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (BZ2_TGZ_NAME "BZ2.tar.gz" CACHE STRING "Use BZ2 from compressed file" FORCE)
+
+set (BZ2_PACKAGE_NAME "bz2" CACHE STRING "Name of BZ2 package" FORCE)
+
+#######
+# fpzip
+#######
+
+set (FPZIP_GIT_URL "https://https://github.com/LLNL/fpzip" CACHE STRING "Use FPZIP from github repository" FORCE)
+set (FPZIP_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (FPZIP_TGZ_NAME "fpzip.tar.gz" CACHE STRING "Use FPZIP from compressed file" FORCE)
+
+set (FPZIP_PACKAGE_NAME "fpzip" CACHE STRING "Name of FPZIP package" FORCE)
+
+######
+# jpeg
+######
+
+set (JPEG_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/jpeg.git" CACHE STRING "Use JPEG from HDF repository" FORCE)
+set (JPEG_GIT_BRANCH "jpeg9c" CACHE STRING "" FORCE)
+
+#set (JPEG_TGZ_NAME "JPEG9c.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
+set (JPEG_TGZ_NAME "JPEG.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
+
+set (JPEG_PACKAGE_NAME "jpeg" CACHE STRING "Name of JPEG package" FORCE)
+
+######
+# lz4
+######
+
+set (BUILD_LZ4_LIBRARY_SOURCE ON CACHE BOOL "build the lz4 library within the plugin" FORCE)
+
+set (LZ4_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/lz4.git" CACHE STRING "Use LZ4 from HDF repository" FORCE)
+set (LZ4_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (LZ4_TGZ_NAME "lz4.tar.gz" CACHE STRING "Use LZ4 from compressed file" FORCE)
+
+set (LZ4_PACKAGE_NAME "lz4" CACHE STRING "Name of LZ4 package" FORCE)
+
+######
+# lzf
+######
+
+set (LZF_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/lzf.git" CACHE STRING "Use LZF from HDF repository" FORCE)
+set (LZF_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (LZF_TGZ_NAME "lzf.tar.gz" CACHE STRING "Use LZF from compressed file" FORCE)
+
+set (LZF_PACKAGE_NAME "lzf" CACHE STRING "Name of LZF package" FORCE)
+
+########
+# mafisc
+########
+
+#set (BUILD_MAFISC_LIBRARY_SOURCE OFF CACHE BOOL "build the mafisc library within the plugin" FORCE)
+
+#set (MAFISC_PACKAGE_NAME "mafisc" CACHE STRING "Name of MAFISC package" FORCE)
+
+######
+# sz
+######
+
+set (SZ_GIT_URL "https://github.com/disheng222/SZ" CACHE STRING "Use SZ from github repository" FORCE)
+set (SZ_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (SZ_TGZ_NAME "sz.tar.gz" CACHE STRING "Use SZ from compressed file" FORCE)
+
+set (SZ_PACKAGE_NAME "sz" CACHE STRING "Name of SZ package" FORCE)
+
+######
+# zfp
+######
+
+set (ZFP_GIT_URL "https://github.com/LLNL/zfp.git" CACHE STRING "Use ZFP from Github" FORCE)
+set (ZFP_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (ZFP_TGZ_NAME "zfp.tar.gz" CACHE STRING "Use ZFP from compressed file" FORCE)
+
+set (ZFP_PACKAGE_NAME "zfp" CACHE STRING "Name of ZFP package" FORCE)
+
diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
index a0e93df..3ab088f 100644
--- a/config/cmake/hdf5-config.cmake.in
+++ b/config/cmake/hdf5-config.cmake.in
@@ -39,6 +39,7 @@ set (${HDF5_PACKAGE_NAME}_BUILD_JAVA @HDF5_BUILD_JAVA@)
set (${HDF5_PACKAGE_NAME}_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
set (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
set (${HDF5_PACKAGE_NAME}_ENABLE_THREADSAFE @HDF5_ENABLE_THREADSAFE@)
+set (${HDF5_PACKAGE_NAME}_ENABLE_PLUGIN_SUPPORT @HDF5_ENABLE_PLUGIN_SUPPORT@)
set (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake
index fe633bf..9704fbd 100644
--- a/config/cmake_ext_mod/HDFLibMacros.cmake
+++ b/config/cmake_ext_mod/HDFLibMacros.cmake
@@ -84,6 +84,10 @@ endmacro ()
#-------------------------------------------------------------------------------
macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
if (${compress_type} MATCHES "GIT")
+# FetchContent_Declare (SZIP
+# GIT_REPOSITORY ${SZIP_URL}
+# GIT_TAG ${SZIP_BRANCH}
+# )
EXTERNALPROJECT_ADD (SZIP
GIT_REPOSITORY ${SZIP_URL}
GIT_TAG ${SZIP_BRANCH}
@@ -104,6 +108,10 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
)
elseif (${compress_type} MATCHES "TGZ")
+# FetchContent_Declare (SZIP
+# URL ${SZIP_URL}
+# URL_HASH ""
+# )
EXTERNALPROJECT_ADD (SZIP
URL ${SZIP_URL}
URL_MD5 ""
@@ -125,7 +133,12 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
)
endif ()
externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR)
-
+# FetchContent_GetProperties(SZIP)
+# if(NOT SZIP_POPULATED)
+# FetchContent_Populate(SZIP)
+# add_subdirectory(${szip_SOURCE_DIR} ${szip_BINARY_DIR})
+# endif()
+#
##include (${BINARY_DIR}/${SZ_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
# Create imported target szip-static
if (USE_LIBAEC)
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index 5740740..eb0392e 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -427,6 +427,19 @@ macro (HDF_DIR_PATHS package_prefix)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
endif ()
endif ()
+
+#-----------------------------------------------------------------------------
+# Setup pre-3.14 FetchContent
+#-----------------------------------------------------------------------------
+ if(${CMAKE_VERSION} VERSION_LESS 3.14)
+ macro(FetchContent_MakeAvailable NAME)
+ FetchContent_GetProperties(${NAME})
+ if(NOT ${NAME}_POPULATED)
+ FetchContent_Populate(${NAME})
+ add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR})
+ endif()
+ endmacro()
+ endif()
endmacro ()
macro (ADD_H5_FLAGS h5_flag_var infile)