summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2020-12-15 00:15:39 (GMT)
committerGitHub <noreply@github.com>2020-12-15 00:15:39 (GMT)
commitd673ee0cdd826100f6c914ea0851d742699ed740 (patch)
treed0ff5f967748b525275c3f37526d33aab87c702c /config
parent629fcdb3d05edeab2f72838e595b5cae1c858c97 (diff)
downloadhdf5-d673ee0cdd826100f6c914ea0851d742699ed740.zip
hdf5-d673ee0cdd826100f6c914ea0851d742699ed740.tar.gz
hdf5-d673ee0cdd826100f6c914ea0851d742699ed740.tar.bz2
OESS-98 Update plugin build option - HDF5 1 12 (#173)
* merge updates from develop * remove extension on command * Run autogen before chkmanifest * Update release text files and whitespace cleanup * Update list * OESS-98 Update plugin build option
Diffstat (limited to 'config')
-rw-r--r--config/cmake/HDF5PluginCache.cmake28
-rw-r--r--config/cmake/HDF5PluginMacros.cmake162
-rw-r--r--config/cmake_ext_mod/HDFLibMacros.cmake15
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake13
4 files changed, 102 insertions, 116 deletions
diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake
new file mode 100644
index 0000000..7f3aea9
--- /dev/null
+++ b/config/cmake/HDF5PluginCache.cmake
@@ -0,0 +1,28 @@
+# This is the CMakeCache file.
+
+########################
+# EXTERNAL cache entries
+########################
+
+# 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 (HDF5_PACKAGE_NAME "hdf5" CACHE STRING "Name of HDF5 package" FORCE)
+set (HDF5_HDF5_HEADER "h5pubconf.h" CACHE STRING "Name of HDF5 header" FORCE)
+set (HDF5_LINK_TARGET ${HDF5_LIBSH_TARGET} CACHE STRING "hdf5 target" FORCE)
+set (HDF5_LINK_LIBS $<TARGET_LINKER_FILE:${HDF5_LIBSH_TARGET}> CACHE STRING "hdf5 shared link library" FORCE)
+#set (HDF5_INCLUDE_DIR $<TARGET_PROPERTY:${HDF5_LIBSH_TARGET},INCLUDE_DIRECTORIES> CACHE PATH "hdf5 include dirs" FORCE)
+set (HDF5_INCLUDE_DIR "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}" CACHE PATH "hdf5 include dirs" FORCE)
+set (HDF5_INCLUDE_DIRS "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}" CACHE PATH "hdf5 include dirs" FORCE)
+set (HDF5_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE STRING "hdf5 build folder" FORCE)
+
+set (H5PL_ALLOW_EXTERNAL_SUPPORT "${HDF5_ALLOW_EXTERNAL_SUPPORT}" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
+
+set (H5PL_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/h5plugin.git" CACHE STRING "Use plugins from HDF repository" FORCE)
+set (H5PL_GIT_BRANCH "master" CACHE STRING "" FORCE)
+
+set (H5PL_TGZ_NAME "${PLUGIN_TGZ_NAME}" CACHE STRING "Use plugins from compressed file" FORCE)
+
+set (PL_PACKAGE_NAME "${PLUGIN_PACKAGE_NAME}" CACHE STRING "Name of plugins package" FORCE)
+set (H5PL_CPACK_ENABLE OFF CACHE BOOL "Enable the CPACK include and components" FORCE)
diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake
index 46d3979..3c0e12c 100644
--- a/config/cmake/HDF5PluginMacros.cmake
+++ b/config/cmake/HDF5PluginMacros.cmake
@@ -3,114 +3,72 @@
#-------------------------------------------------------------------------------
macro (EXTERNAL_PLUGIN_LIBRARY compress_type)
if (${compress_type} MATCHES "GIT")
- EXTERNALPROJECT_ADD (PLUGIN
+ FetchContent_Declare (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_LINKER_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}
- -DSZF_TGZ_NAME:STRING=${SZF_TGZ_NAME}
- -DSZF_PACKAGE_NAME:STRING=${SZF_PACKAGE_NAME}
- -DZFP_TGZ_NAME:STRING=${ZFP_TGZ_NAME}
- -DZFP_PACKAGE_NAME:STRING=${ZFP_PACKAGE_NAME}
)
elseif (${compress_type} MATCHES "TGZ")
- EXTERNALPROJECT_ADD (PLUGIN
+ FetchContent_Declare (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_LINKER_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}
- -DSZF_TGZ_NAME:STRING=${SZF_TGZ_NAME}
- -DSZF_PACKAGE_NAME:STRING=${SZF_PACKAGE_NAME}
- -DZFP_TGZ_NAME:STRING=${ZFP_TGZ_NAME}
- -DZFP_PACKAGE_NAME:STRING=${ZFP_PACKAGE_NAME}
+ URL_HASH ""
)
endif ()
- externalproject_get_property (PLUGIN BINARY_DIR SOURCE_DIR)
- set (PLUGIN_BINARY_DIR "${BINARY_DIR}")
-
-# include (${BINARY_DIR}/PLUGIN-targets.cmake)
+ FetchContent_GetProperties(PLUGIN)
+ message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
+ if(NOT PLUGIN_POPULATED)
+ FetchContent_Populate(PLUGIN)
+ 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_DIR};${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_DIR};${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_DIR};${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_DIR};${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_DIR};${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_DIR};${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_DIR};${HDF5_SRC_BINARY_DIR}")
+ endif ()
+ if (ENABLE_SZF)
+ add_dependencies (h5szf ${HDF5_LIBSH_TARGET})
+ add_dependencies (h5ex_d_szf ${HDF5_LIBSH_TARGET})
+ target_include_directories (h5ex_d_szf PRIVATE "${HDF5_SRC_DIR};${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_DIR};${HDF5_SRC_BINARY_DIR}")
+ endif ()
+ endif()
+ message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
+ set (PLUGIN_BINARY_DIR "${plugin_BINARY_DIR}")
+ set (PLUGIN_SOURCE_DIR "${plugin_SOURCE_DIR}")
set (PLUGIN_LIBRARY "PLUGIN")
set (PLUGIN_FOUND 1)
endmacro ()
@@ -129,7 +87,7 @@ macro (FILTER_OPTION plname)
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (NOT TGZPATH)
set (TGZPATH ${H5PL_SOURCE_DIR})
- endif ()
+ endif ()
set (HDF_${plname}_URL ${TGZPATH}/${HDF_${plname}_TGZ_NAME})
endif ()
endif ()
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake
index 9704fbd..fe633bf 100644
--- a/config/cmake_ext_mod/HDFLibMacros.cmake
+++ b/config/cmake_ext_mod/HDFLibMacros.cmake
@@ -84,10 +84,6 @@ 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}
@@ -108,10 +104,6 @@ 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 ""
@@ -133,12 +125,7 @@ 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 8ca8159..952b766 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -429,6 +429,19 @@ macro (HDF_DIR_PATHS package_prefix)
endif ()
endif ()
+ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ if (CMAKE_HOST_UNIX)
+ set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
+ CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
+ else ()
+ GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
+ set (CMAKE_INSTALL_PREFIX
+ "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
+ CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
+ set (CMAKE_GENERIC_PROGRAM_FILES)
+ endif ()
+ endif ()
+
#-----------------------------------------------------------------------------
# Setup pre-3.14 FetchContent
#-----------------------------------------------------------------------------