summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-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
5 files changed, 30 insertions, 166 deletions
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)
#############