diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-10-25 21:27:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-25 21:27:43 (GMT) |
commit | d615f1d36193f16762499d676a25243397482a0f (patch) | |
tree | fde81880af821a6695cd453c2c1e6c147244e5fe /config/cmake | |
parent | ca01d00a80990674922e5a716d05a9d38489182b (diff) | |
download | hdf5-d615f1d36193f16762499d676a25243397482a0f.zip hdf5-d615f1d36193f16762499d676a25243397482a0f.tar.gz hdf5-d615f1d36193f16762499d676a25243397482a0f.tar.bz2 |
Update CMake to use plugins and compression fetchcontent (#3763)
* Update CMake to use plugins and compression fetchcontent
* Update cdash project name
Diffstat (limited to 'config/cmake')
-rw-r--r-- | config/cmake/HDF5PluginCache.cmake | 10 | ||||
-rw-r--r-- | config/cmake/HDF5PluginMacros.cmake | 77 | ||||
-rw-r--r-- | config/cmake/HDFLibMacros.cmake | 176 | ||||
-rw-r--r-- | config/cmake/cacheinit.cmake | 89 | ||||
-rw-r--r-- | config/cmake/mccacheinit.cmake | 5 | ||||
-rw-r--r-- | config/cmake/scripts/CTestScript.cmake | 12 |
6 files changed, 83 insertions, 286 deletions
diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake index 0d1795d..1407561 100644 --- a/config/cmake/HDF5PluginCache.cmake +++ b/config/cmake/HDF5PluginCache.cmake @@ -6,7 +6,7 @@ # examples are the tests for plugins set (H5PL_BUILD_TESTING ON CACHE BOOL "Enable H5PL testing" FORCE) -set (BUILD_EXAMPLES ON CACHE BOOL "Build H5PL Examples" FORCE) +set (BUILD_EXAMPLES ${HDF5_BUILD_EXAMPLES} CACHE BOOL "Build H5PL Examples" 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) @@ -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 e2ace24..b5e63d4 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 #------------------------------------------------------------------------------- @@ -22,56 +33,6 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) include (${HDF_RESOURCES_DIR}/HDF5PluginCache.cmake) set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) add_subdirectory(${plugin_SOURCE_DIR} ${plugin_BINARY_DIR}) - if (ENABLE_BLOSC) - add_dependencies (h5blosc ${HDF5_LIBSH_TARGET}) - add_dependencies (h5ex_d_blosc ${HDF5_LIBSH_TARGET}) - target_include_directories (h5ex_d_blosc PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}") - endif () - if (ENABLE_BSHUF) - add_dependencies (h5bshuf ${HDF5_LIBSH_TARGET}) - add_dependencies (h5ex_d_bshuf ${HDF5_LIBSH_TARGET}) - target_include_directories (h5ex_d_bshuf PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}") - endif () - if (ENABLE_BZIP2) - add_dependencies (h5bz2 ${HDF5_LIBSH_TARGET}) - add_dependencies (h5ex_d_bzip2 ${HDF5_LIBSH_TARGET}) - target_include_directories (h5ex_d_bzip2 PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}") - endif () - if (ENABLE_JPEG) - add_dependencies (h5jpeg ${HDF5_LIBSH_TARGET}) - add_dependencies (h5ex_d_jpeg ${HDF5_LIBSH_TARGET}) - target_include_directories (h5ex_d_jpeg PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}") - endif () - if (ENABLE_LZ4) - add_dependencies (h5lz4 ${HDF5_LIBSH_TARGET}) - add_dependencies (h5ex_d_lz4 ${HDF5_LIBSH_TARGET}) - target_include_directories (h5ex_d_lz4 PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}") - endif () - if (ENABLE_LZF) - add_dependencies (h5lzf ${HDF5_LIBSH_TARGET}) - add_dependencies (h5ex_d_lzf ${HDF5_LIBSH_TARGET}) - target_include_directories (h5ex_d_lzf PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}") - endif () - if (ENABLE_MAFISC) - add_dependencies (h5mafisc ${HDF5_LIBSH_TARGET}) - add_dependencies (h5ex_d_mafisc ${HDF5_LIBSH_TARGET}) - target_include_directories (h5ex_d_mafisc PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}") - endif () - if (ENABLE_SZ) - add_dependencies (h5sz ${HDF5_LIBSH_TARGET}) - add_dependencies (h5ex_d_sz ${HDF5_LIBSH_TARGET}) - target_include_directories (h5ex_d_sz PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}") - endif () - if (ENABLE_ZFP) - add_dependencies (h5zfp ${HDF5_LIBSH_TARGET}) - add_dependencies (h5ex_d_zfp ${HDF5_LIBSH_TARGET}) - target_include_directories (h5ex_d_zfp PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}") - endif () - if (ENABLE_ZSTD) - add_dependencies (h5zstd ${HDF5_LIBSH_TARGET}) - add_dependencies (h5ex_d_zstd ${HDF5_LIBSH_TARGET}) - target_include_directories (h5ex_d_zstd PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}") - endif () endif () if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") @@ -87,18 +48,18 @@ 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) + option (HDF_${plname}_USE_EXTERNAL "Use External Library Building for ${PLUGIN_NAME} plugin" OFF) mark_as_advanced (HDF_${plname}_USE_EXTERNAL) - 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") + if (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") + set (HDF_${plname}_USE_EXTERNAL ON CACHE BOOL "Use External Library Building for ${PLUGIN_NAME} plugin" FORCE) + 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 752d817..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 @@ -68,7 +68,6 @@ macro (ORIGINAL_SZIP_LIBRARY compress_type encoding) add_subdirectory(${szip_SOURCE_DIR} ${szip_BINARY_DIR}) endif() - set (USE_LIBAEC ON CACHE BOOL "Use libaec szip replacement" FORCE) add_library (${HDF_PACKAGE_NAMESPACE}szaec-static ALIAS szaec-static) add_library (${HDF_PACKAGE_NAMESPACE}aec-static ALIAS aec-static) set (SZIP_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}szaec-static;${HDF_PACKAGE_NAMESPACE}aec-static") @@ -79,174 +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}/${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake) -# Create imported target szip-static - if (USE_LIBAEC) - 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") - else () - add_library(${HDF_PACKAGE_NAMESPACE}szip-static STATIC IMPORTED) - HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}szip-static "szip" STATIC "") - add_dependencies (${HDF_PACKAGE_NAMESPACE}szip-static SZIP) - set (SZIP_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}szip-static") - endif () - set (SZIP_LIBRARIES ${SZIP_STATIC_LIBRARY}) - - set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}") - if (USE_LIBAEC) - set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/include") - else () - set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src") - endif () - set (SZIP_FOUND 1) - set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR}) -endmacro () - -#------------------------------------------------------------------------------- -macro (PACKAGE_SZIP_LIBRARY compress_type) - set (SZIP_HDR "SZconfig") - if (USE_LIBAEC) - set (SZIP_HDR "aec_config") - else () - set (SZIP_HDR "libaec_Export") - endif () - add_custom_target (SZIP-GenHeader-Copy ALL - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_INCLUDE_DIR_GEN}/${SZIP_HDR}.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ - COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/${SZIP_HDR}.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" - ) - set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${SZIP_HDR}.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 4713578..a950539 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -50,28 +50,23 @@ set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ) ######################## # compression options ######################## - 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_TGZ_NAME "zlib-1.3.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE) +set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.3" CACHE STRING "Use ZLIB from original location" FORCE) set (ZLIB_USE_LOCALCONTENT ON CACHE BOOL "Use local file for ZLIB FetchContent" FORCE) -set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE) set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" 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) +set (LIBAEC_TGZ_NAME "libaec-1.0.6.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 ON CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE) ######################## # 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_NAME "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) set (H5PL_VERS_MAJOR "1" CACHE STRING "Major version of hdf5 package for PLUGIN package" FORCE) set (H5PL_VERS_MINOR "12" CACHE STRING "Minor version of hdf5 package for PLUGIN package" FORCE) @@ -81,10 +76,11 @@ set (H5PL_VERS_RELEASE "3" CACHE STRING "Release version of hdf5 package for PLU # bitshuffle ############# -set (BSHUF_GIT_URL "https://someurl/bitshuffle.git" CACHE STRING "Use BSHUF from HDF Group repository" FORCE) +set (BSHUF_GIT_URL "https://github.com/kiyo-masui/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_TGZ_ORIGPATH "https://github.com/kiyo-masui/bitshuffle/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE) +set (BSHUF_TGZ_NAME "bitshuffle-0.5.1.tar.gz" CACHE STRING "Use BSHUF from compressed file" FORCE) set (BSHUF_PACKAGE_NAME "bshuf" CACHE STRING "Name of BSHUF package" FORCE) @@ -92,17 +88,19 @@ 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 repository" FORCE) -set (BLOSC_GIT_BRANCH "master" CACHE STRING "" FORCE) +set (BLOSC_GIT_URL "https://github.com/Blosc/c-blosc.git" CACHE STRING "Use BLOSC from Github repository" FORCE) +set (BLOSC_GIT_BRANCH "main" CACHE STRING "" FORCE) -set (BLOSC_TGZ_NAME "c-blosc.tar.gz" CACHE STRING "Use BLOSC from compressed file" FORCE) +set (BLOSC_TGZ_ORIGPATH "https://github.com/Blosc/c-blosc/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE) +set (BLOSC_TGZ_NAME "c-blosc-1.21.5.tar.gz" CACHE STRING "Use BLOSC from compressed file" FORCE) set (BLOSC_PACKAGE_NAME "blosc" CACHE STRING "Name of BLOSC package" FORCE) -set (BLOSC_ZLIB_GIT_URL "https://someurl/zlib.git" CACHE STRING "Use BLOSC_ZLIB from HDF Group repository" FORCE) -set (BLOSC_ZLIB_GIT_BRANCH "master" CACHE STRING "" FORCE) +set (BLOSC_ZLIB_GIT_URL "https://github.com/madler/zlib.git" CACHE STRING "Use ZLIB from GitHub repository" FORCE) +set (BLOSC_ZLIB_GIT_BRANCH "develop" CACHE STRING "" FORCE) -set (BLOSC_ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use BLOSC_ZLib from compressed file" FORCE) +set (BLOSC_ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.3" CACHE STRING "Use PLUGINS from original location" FORCE) +set (BLOSC_ZLIB_TGZ_NAME "zlib-1.3.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE) set (BLOSC_ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of BLOSC_ZLIB package" FORCE) @@ -110,10 +108,11 @@ set (BLOSC_ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of BLOSC_ZLIB package" FO # bzip2 ######## -set (BZ2_GIT_URL "https://someurl/bzip2.git" CACHE STRING "Use BZ2 from HDF Group repository" FORCE) +set (BZ2_GIT_URL "https://github.com/libarchive/bzip2.git" CACHE STRING "Use BZ2 from GitHub 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_TGZ_ORIGPATH "https://github.com/libarchive/bzip2/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE) +set (BZ2_TGZ_NAME "bzip2-bzip2-1.0.8.tar.gz" CACHE STRING "Use BZ2 from compressed file" FORCE) set (BZ2_PACKAGE_NAME "bz2" CACHE STRING "Name of BZ2 package" FORCE) @@ -121,10 +120,11 @@ 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_GIT_URL "https://github.com/LLNL/fpzip.git" CACHE STRING "Use FPZIP from GitHub repository" FORCE) +set (FPZIP_GIT_BRANCH "develop" CACHE STRING "" FORCE) -set (FPZIP_TGZ_NAME "fpzip.tar.gz" CACHE STRING "Use FPZIP from compressed file" FORCE) +set (FPZIP_TGZ_ORIGPATH "https://github.com/LLNL/fpzip/releases/download/1.3.0" CACHE STRING "Use PLUGINS from original location" FORCE) +set (FPZIP_TGZ_NAME "fpzip-1.3.0.tar.gz" CACHE STRING "Use FPZIP from compressed file" FORCE) set (FPZIP_PACKAGE_NAME "fpzip" CACHE STRING "Name of FPZIP package" FORCE) @@ -132,11 +132,11 @@ set (FPZIP_PACKAGE_NAME "fpzip" CACHE STRING "Name of FPZIP package" FORCE) # jpeg ####### -set (JPEG_GIT_URL "https://someurl/jpeg.git" CACHE STRING "Use JPEG from HDF Group repository" FORCE) -set (JPEG_GIT_BRANCH "jpeg9c" CACHE STRING "" FORCE) +set (JPEG_GIT_URL "No repo www.ijg.org/files" CACHE STRING "Use JPEG from ILG" FORCE) +set (JPEG_GIT_BRANCH "v9e" 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_TGZ_ORIGPATH "https://www.ijg.org/files" CACHE STRING "Use PLUGINS from original location" FORCE) +set (JPEG_TGZ_NAME "jpegsrc.v9e.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE) set (JPEG_PACKAGE_NAME "jpeg" CACHE STRING "Name of JPEG package" FORCE) @@ -146,10 +146,11 @@ set (JPEG_PACKAGE_NAME "jpeg" CACHE STRING "Name of JPEG package" FORCE) set (BUILD_LZ4_LIBRARY_SOURCE ON CACHE BOOL "build the lz4 library within the plugin" FORCE) -set (LZ4_GIT_URL "https://someurl/lz4.git" CACHE STRING "Use LZ4 from HDF Group repository" FORCE) -set (LZ4_GIT_BRANCH "master" CACHE STRING "" FORCE) +set (LZ4_GIT_URL "https://github.com/lz4/lz4.git" CACHE STRING "Use LZ4 from GitHub repository" FORCE) +set (LZ4_GIT_BRANCH "dev" CACHE STRING "" FORCE) -set (LZ4_TGZ_NAME "lz4.tar.gz" CACHE STRING "Use LZ4 from compressed file" FORCE) +set (LZ4_TGZ_ORIGPATH "https://github.com/lz4/lz4/releases/download/v1.9.4" CACHE STRING "Use PLUGINS from original location" FORCE) +set (LZ4_TGZ_NAME "lz4-1.9.4.tar.gz" CACHE STRING "Use LZ4 from compressed file" FORCE) set (LZ4_PACKAGE_NAME "lz4" CACHE STRING "Name of LZ4 package" FORCE) @@ -157,10 +158,10 @@ set (LZ4_PACKAGE_NAME "lz4" CACHE STRING "Name of LZ4 package" FORCE) # lzf ###### -set (LZF_GIT_URL "https://someurl/lzf.git" CACHE STRING "Use LZF from HDF Group repository" FORCE) -set (LZF_GIT_BRANCH "master" CACHE STRING "" FORCE) +set (LZF_URL "http://software.schmorp.de/pkg/liblzf.html" CACHE STRING "LZF home" FORCE) -set (LZF_TGZ_NAME "lzf.tar.gz" CACHE STRING "Use LZF from compressed file" FORCE) +set (LZF_TGZ_ORIGPATH "http://dist.schmorp.de/liblzf" CACHE STRING "Use LZF from original location" FORCE) +set (LZF_TGZ_NAME "liblzf-3.6.tar.gz" CACHE STRING "Use LZF from compressed file" FORCE) set (LZF_PACKAGE_NAME "lzf" CACHE STRING "Name of LZF package" FORCE) @@ -170,16 +171,19 @@ set (LZF_PACKAGE_NAME "lzf" CACHE STRING "Name of LZF package" FORCE) #set (BUILD_MAFISC_LIBRARY_SOURCE OFF CACHE BOOL "build the mafisc library within the plugin" FORCE) +#set (MAFISC_TGZ_ORIGPATH "" CACHE STRING "Use PLUGINS from original location" FORCE) +#set (MAFISC_TGZ_NAME ".tar.gz" CACHE STRING "Use MAFISC from compressed file" 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 filter from GitHub repository" FORCE) +set (SZ_GIT_URL "https://github.com/szcompressor/SZ.git" CACHE STRING "Use SZ filter from GitHub repository" FORCE) set (SZ_GIT_BRANCH "master" CACHE STRING "" FORCE) -set (SZ_TGZ_NAME "szf.tar.gz" CACHE STRING "Use SZ filter from compressed file" FORCE) +set (SZ_TGZ_ORIGPATH "https://github.com/szcompressor/SZ/releases/download/v2.1.12.5" CACHE STRING "Use PLUGINS from original location" FORCE) +set (SZ_TGZ_NAME "SZ-2.1.12.5.tar.gz" CACHE STRING "Use SZ filter from compressed file" FORCE) set (SZ_PACKAGE_NAME "SZ" CACHE STRING "Name of SZ filter package" FORCE) @@ -187,10 +191,11 @@ set (SZ_PACKAGE_NAME "SZ" CACHE STRING "Name of SZ filter package" FORCE) # zfp ###### -set (ZFP_GIT_URL "https://github.com/LLNL/zfp.git" CACHE STRING "Use ZFP from GitHub repository" FORCE) -set (ZFP_GIT_BRANCH "master" CACHE STRING "" FORCE) +set (ZFP_GIT_URL "https://github.com/LLNL/zfp.git" CACHE STRING "Use ZFP from GitHub repository" FORCE) +set (ZFP_GIT_BRANCH "develop" CACHE STRING "" FORCE) -set (ZFP_TGZ_NAME "zfp.tar.gz" CACHE STRING "Use ZFP from compressed file" FORCE) +set (ZFP_TGZ_ORIGPATH "https://github.com/LLNL/zfp/releases/download/1.0.0" CACHE STRING "Use PLUGINS from original location" FORCE) +set (ZFP_TGZ_NAME "zfp-1.0.0.tar.gz" CACHE STRING "Use ZFP from compressed file" FORCE) set (ZFP_PACKAGE_NAME "zfp" CACHE STRING "Name of ZFP package" FORCE) @@ -198,10 +203,10 @@ set (ZFP_PACKAGE_NAME "zfp" CACHE STRING "Name of ZFP package" FORCE) # zstd ###### -set (ZSTD_GIT_URL "https://github.com/facebook/zstd" CACHE STRING "Use ZSTD from repository" FORCE) +set (ZSTD_GIT_URL "https://github.com/facebook/zstd.git" CACHE STRING "Use ZSTD from GitHub repository" FORCE) set (ZSTD_GIT_BRANCH "dev" CACHE STRING "" FORCE) -set (ZSTD_TGZ_NAME "zstd.tar.gz" CACHE STRING "Use ZSTD from compressed file" FORCE) +set (ZSTD_TGZ_ORIGPATH "https://github.com/facebook/zstd/releases/download/v1.5.5" CACHE STRING "Use PLUGINS from original location" FORCE) +set (ZSTD_TGZ_NAME "zstd-1.5.5.tar.gz" CACHE STRING "Use ZSTD from compressed file" FORCE) set (ZSTD_PACKAGE_NAME "zstd" CACHE STRING "Name of ZSTD package" FORCE) - diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake index ef1ac4a..55132fb 100644 --- a/config/cmake/mccacheinit.cmake +++ b/config/cmake/mccacheinit.cmake @@ -56,10 +56,7 @@ set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE) set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" 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) -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) +set (LIBAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE) set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE) diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index fb9dd57..4bd31ac 100644 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -202,14 +202,14 @@ endforeach () # Initialize the CTEST commands #------------------------------ if (CMAKE_GENERATOR_TOOLSET) - set (CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}") + set (CTEST_CONFIGURE_TOOLSET "\"-T${CMAKE_GENERATOR_TOOLSET}\"") else () - set (CTEST_CONFIGURE_TOOLSET "") + set (CTEST_CONFIGURE_TOOLSET) endif() if (CMAKE_GENERATOR_ARCHITECTURE) - set (CTEST_CONFIGURE_ARCHITECTURE "-A${CMAKE_GENERATOR_ARCHITECTURE}") + set (CTEST_CONFIGURE_ARCHITECTURE "\"-A${CMAKE_GENERATOR_ARCHITECTURE}\"") else () - set (CTEST_CONFIGURE_ARCHITECTURE "") + set (CTEST_CONFIGURE_ARCHITECTURE) endif() if (LOCAL_MEMCHECK_TEST) if(LOCAL_USE_VALGRIND) @@ -217,7 +217,7 @@ if (LOCAL_MEMCHECK_TEST) find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind) endif() set (CTEST_CONFIGURE_COMMAND - "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\"" + "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" ${CTEST_CONFIGURE_ARCHITECTURE} ${CTEST_CONFIGURE_TOOLSET} \"${CTEST_SOURCE_DIRECTORY}\"" ) else () if (LOCAL_COVERAGE_TEST) @@ -226,7 +226,7 @@ else () endif () endif () set (CTEST_CONFIGURE_COMMAND - "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\"" + "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" ${CTEST_CONFIGURE_ARCHITECTURE} ${CTEST_CONFIGURE_TOOLSET} \"${CTEST_SOURCE_DIRECTORY}\"" ) endif () |