summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-04-27 18:29:43 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-04-27 18:29:43 (GMT)
commit4164dc2738949659e40adeedaf3c1e83aa04930e (patch)
treeedea95cb6f161d881d7286b633dc34feaf294517
parentc034efb0e2be94627d8c97b488f3b1d18a23ff2f (diff)
downloadhdf5-4164dc2738949659e40adeedaf3c1e83aa04930e.zip
hdf5-4164dc2738949659e40adeedaf3c1e83aa04930e.tar.gz
hdf5-4164dc2738949659e40adeedaf3c1e83aa04930e.tar.bz2
OESS-65 replace szip with aec szip
-rw-r--r--CMakeFilters.cmake15
-rw-r--r--CMakeLists.txt10
-rwxr-xr-xbin/release30
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake10
-rw-r--r--config/cmake/HDFCompilerFlags.cmake14
-rw-r--r--config/cmake/cacheinit.cmake2
-rw-r--r--config/cmake/mccacheinit.cmake2
-rw-r--r--config/cmake_ext_mod/HDFLibMacros.cmake64
-rw-r--r--config/toolchain/build32.cmake2
-rw-r--r--release_docs/INSTALL_CMake.txt9
-rw-r--r--release_docs/README_HDF5_CMake2
-rw-r--r--release_docs/RELEASE.txt10
12 files changed, 91 insertions, 79 deletions
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index 5a89564..0d64b55 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -9,6 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
+option (USE_LIBAEC "Use AEC library as SZip Filter" OFF)
include (ExternalProject)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
@@ -32,6 +33,9 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
message (STATUS "Filter ZLIB file ${ZLIB_URL} not found")
endif ()
set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME})
+ if (USE_LIBAEC)
+ set (SZIP_URL ${TGZPATH}/${SZAEC_TGZ_NAME})
+ endif ()
if (NOT EXISTS "${SZIP_URL}")
set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
message (STATUS "Filter SZIP file ${SZIP_URL} not found")
@@ -54,7 +58,6 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
find_package (ZLIB) # Legacy find
if (ZLIB_FOUND)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES})
- set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${ZLIB_LIBRARIES})
endif ()
endif ()
endif ()
@@ -85,9 +88,6 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (H5_HAVE_FILTER_DEFLATE)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
endif ()
- if (BUILD_SHARED_LIBS)
- set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${ZLIB_SHARED_LIBRARY})
- endif ()
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
message (STATUS "Filter ZLIB is ON")
@@ -105,7 +105,6 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
find_package (SZIP) # Legacy find
if (SZIP_FOUND)
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
- set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_LIBRARIES})
endif ()
endif ()
endif ()
@@ -122,13 +121,13 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
set (H5_HAVE_SZLIB_H 1)
set (H5_HAVE_LIBSZ 1)
message (STATUS "Filter SZIP is built")
+ if (USE_LIBAEC)
+ message (STATUS "... with library AEC")
+ endif ()
else ()
message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
endif ()
endif ()
- if (BUILD_SHARED_LIBS)
- set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_SHARED_LIBRARY})
- endif ()
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
message (STATUS "Filter SZIP is ON")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a4aa60c..a3fa903 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -753,28 +753,28 @@ if (HDF5_ENABLE_THREADSAFE)
endif ()
if (HDF5_ENABLE_PARALLEL)
if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ")
+ message (FATAL_ERROR " **** parallel and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ")
endif ()
endif ()
if (HDF5_BUILD_FORTRAN)
if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** Fortran and thread-safety options are not supported **** ")
+ message (FATAL_ERROR " **** Fortran and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ")
endif ()
endif ()
if (HDF5_BUILD_CPP_LIB)
if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** C++ and thread-safety options are not supported **** ")
+ message (FATAL_ERROR " **** C++ and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ")
endif ()
endif ()
if (HDF5_BUILD_HL_LIB)
if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** HL and thread-safety options are not supported **** ")
+ message (FATAL_ERROR " **** HL and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported HL and thread-safety options **** ")
endif ()
@@ -965,7 +965,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
# check for unsupported options
if (HDF5_ENABLE_PARALLEL)
if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
+ message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive, override with ALLOW_UNSUPPORTED option **** ")
else ()
message (STATUS " **** Allowing unsupported Parallel and C++ options **** ")
endif ()
diff --git a/bin/release b/bin/release
index d7d0a55..7a24938 100755
--- a/bin/release
+++ b/bin/release
@@ -177,14 +177,14 @@ tar2zip()
# Note: do this in a temporary directory to avoid changing
# the original source directory which may be around.
# 2. add build-unix.sh script.
-# 3. add SZIP.tar.gz, ZLib.tar.gz and cmake files to top level directory.
+# 3. add LIBAEC.tar.gz, ZLib.tar.gz and cmake files to top level directory.
# 4. create gzipped tar file with these contents:
# build-unix.sh script
# hdf5-<version> source code directory extracted from tar file
# CTestScript.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
# HDF5config.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
# HDF5options.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
-# SZip.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
+# LIBAEC.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
# ZLib.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
@@ -197,7 +197,7 @@ tar2zip()
#
# need function to create another temporary directory, extract the
# $tmpdir/$HDF5_VERS.tar into it, create build-VS*.bat files,
- # add CTestScript.cmake, HDF5config.cmake, SZIP.tar.gz
+ # add CTestScript.cmake, HDF5config.cmake, LIBAEC.tar.gz
# ZLib.tar.gz, HDF5 examples, and then zip it.
tar2cmakezip()
{
@@ -230,8 +230,8 @@ tar2cmakezip()
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS2017 -C Release -V -O hdf5.log" > build-VS2017-32.bat; chmod 755 build-VS2017-32.bat)
(cd $cmziptmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -V -O hdf5.log" > build-VS2017-64.bat; chmod 755 build-VS2017-64.bat)
- # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
- cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmziptmpsubdir
+ # step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
+ cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.14-Source.zip $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir
@@ -276,14 +276,14 @@ tar2cmakezip()
# Note: do this in a temporary directory to avoid changing
# the original source directory which may be around.
# 2. add build-unix.sh script.
-# 3. add SZIP.tar.gz, ZLib.tar.gz and cmake files to top level directory.
+# 3. add LIBAEC.tar.gz, ZLib.tar.gz and cmake files to top level directory.
# 4. create gzipped tar file with these contents:
# build-unix.sh script
# hdf5-<version> source code directory extracted from tar file
# CTestScript.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
# HDF5config.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
# HDF5options.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
-# SZip.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
+# LIBAEC.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
# ZLib.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
@@ -296,7 +296,7 @@ tar2cmakezip()
#
# need function to create another temporary directory, extract the
# $tmpdir/$HDF5_VERS.tar into it, create build-unix.sh,
- # add CTestScript.cmake, HDF5config.cmake, SZIP.tar.gz
+ # add CTestScript.cmake, HDF5config.cmake, LIBAEC.tar.gz
# ZLib.tar.gz, HDF5 examples, and then tar.gz it.
tar2cmaketgz()
{
@@ -325,8 +325,8 @@ tar2cmaketgz()
# step 2: add build-unix.sh script
(cd $cmgztmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log" > build-unix.sh; chmod 755 build-unix.sh)
- # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
- cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir
+ # step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
+ cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.14-Source.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
@@ -353,14 +353,14 @@ tar2cmaketgz()
# Note: do this in a temporary directory to avoid changing
# the original source directory which may be around.
# 2. add build-unix.sh script.
-# 3. add SZIP.tar.gz, ZLib.tar.gz and cmake files to top level directory.
+# 3. add LIBAEC.tar.gz, ZLib.tar.gz and cmake files to top level directory.
# 4. create gzipped tar file with these contents:
# build-unix.sh script
# hdf5-<version> source code directory extracted from tar file
# CTestScript.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
# HDF5config.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
# HDF5options.cmake cmake file copied from <hdf5 source code>/config/cmake/scripts
-# SZip.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
+# LIBAEC.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
# ZLib.tar.gz copied from /mnt/scr1/pre-release/hdf5/CMake
#
# 5. For HPC-CMake tgz file the following are also needed in the top-level directory:
@@ -379,7 +379,7 @@ tar2cmaketgz()
#
# need function to create another temporary directory, extract the
# $tmpdir/$HDF5_VERS.tar into it, create build-unix.sh,
- # add CTestScript.cmake, HDF5config.cmake, SZIP.tar.gz
+ # add CTestScript.cmake, HDF5config.cmake, LIBAEC.tar.gz
# ZLib.tar.gz, HDF5 examples, and then tar.gz it.
tar2hpccmaketgz()
{
@@ -408,8 +408,8 @@ tar2hpccmaketgz()
# step 2: add build-unix.sh script
(cd $cmgztmpsubdir; echo "ctest -S HDF5config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf5.log" > build-unix.sh; chmod 755 build-unix.sh)
- # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
- cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir
+ # step 3: add LIBAEC.tar.gz, ZLib.tar.gz and cmake files
+ cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.10.14-Source.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index 1c95266..47991bf 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -299,7 +299,7 @@ if (HDF5_ENABLE_GROUPZERO_WARNINGS)
else ()
if (CMAKE_COMPILER_IS_GNUCC)
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
- list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CFLAGS0})
+ list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS0})
endif ()
endif ()
endif ()
@@ -318,7 +318,7 @@ if (HDF5_ENABLE_GROUPONE_WARNINGS)
else ()
if (CMAKE_COMPILER_IS_GNUCC)
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
- list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CFLAGS1})
+ list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS1})
endif ()
endif ()
endif ()
@@ -337,7 +337,7 @@ if (HDF5_ENABLE_GROUPTWO_WARNINGS)
else ()
if (CMAKE_COMPILER_IS_GNUCC)
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
- list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CFLAGS2})
+ list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS2})
endif ()
endif ()
endif ()
@@ -356,7 +356,7 @@ if (HDF5_ENABLE_GROUPTHREE_WARNINGS)
else ()
if (CMAKE_COMPILER_IS_GNUCC)
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
- list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CFLAGS3})
+ list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS3})
endif ()
endif ()
endif ()
@@ -370,7 +370,7 @@ if (HDF5_ENABLE_GROUPFOUR_WARNINGS)
if (NOT MSVC)
if (CMAKE_COMPILER_IS_GNUCC)
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
- list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CFLAGS4})
+ list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS4})
endif ()
endif ()
endif ()
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index ddd3703..6dbaa64 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -93,8 +93,8 @@ if (NOT MSVC)
list (APPEND H5_CFLAGS0 "-Wsign-compare -Wtrigraphs -Wwrite-strings")
endif()
elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
- # Add general CFlags except for older versions that are no longer supported
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.2)
+ # Add general CFlags for GCC versions 4.2 and above
+ if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2)
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general")
endif ()
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
@@ -138,7 +138,7 @@ if (NOT MSVC)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
# Technically, variable-length arrays are part of the C99 standard, but
# we should approach them a bit cautiously... Only needed for gcc 4.X
- if (CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.2)
+ if (CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2)
ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.2-4.last")
endif ()
@@ -153,11 +153,10 @@ if (NOT MSVC)
endif ()
# Append warning flags that only gcc 4.3+ knows about
- if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.3 AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.2)
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.3)
ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.3")
endif ()
-
# Append more extra warning flags that only gcc 4.4+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.4")
@@ -174,7 +173,7 @@ if (NOT MSVC)
endif ()
# Append more extra warning flags that only gcc 4.6 and less know about
- if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7 AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.2)
+ if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2)
ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.2-4.6")
endif ()
@@ -218,7 +217,7 @@ if (NOT MSVC)
ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9")
endif ()
- # Append more extra warning flags that only gcc 5.1+ know about
+ # Append more extra warning flags that only gcc 5.x+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/5")
ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5")
@@ -242,6 +241,7 @@ if (NOT MSVC)
# Append more extra warning flags that only gcc 8.x+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0)
ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
+ ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
if (HDF5_ENABLE_DEV_WARNINGS)
ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
else ()
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index 5254115..4efb185 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -43,6 +43,8 @@ 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)
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index 1608202..f4bfb07 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -51,6 +51,8 @@ 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)
set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake
index 9df2b4b..cbca47f 100644
--- a/config/cmake_ext_mod/HDFLibMacros.cmake
+++ b/config/cmake_ext_mod/HDFLibMacros.cmake
@@ -20,7 +20,7 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
GIT_TAG ${JPEG_BRANCH}
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DJPEG_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -39,7 +39,7 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
URL_MD5 ""
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DJPEG_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -62,14 +62,6 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
add_dependencies (${HDF_PACKAGE_NAMESPACE}jpeg-static JPEG)
set (JPEG_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}jpeg-static")
set (JPEG_LIBRARIES ${JPEG_STATIC_LIBRARY})
- if (BUILD_SHARED_LIBS)
- # Create imported target jpeg-shared
- add_library(${HDF_PACKAGE_NAMESPACE}jpeg-shared SHARED IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}jpeg-shared "jpeg" SHARED "")
- add_dependencies (${HDF_PACKAGE_NAMESPACE}jpeg-shared JPEG)
- set (JPEG_SHARED_LIBRARY "${HDF_PACKAGE_NAMESPACE}jpeg-shared")
- set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_SHARED_LIBRARY})
- endif ()
set (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}")
set (JPEG_INCLUDE_DIR "${SOURCE_DIR}/src")
@@ -97,7 +89,7 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
GIT_TAG ${SZIP_BRANCH}
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -117,7 +109,7 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
URL_MD5 ""
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -136,19 +128,21 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
##include (${BINARY_DIR}/${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
# Create imported target szip-static
- 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")
- set (SZIP_LIBRARIES ${SZIP_STATIC_LIBRARY})
- if (BUILD_SHARED_LIBS)
- # Create imported target szip-shared
- add_library(${HDF_PACKAGE_NAMESPACE}szip-shared SHARED IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}szip-shared "szip" SHARED "")
- add_dependencies (${HDF_PACKAGE_NAMESPACE}szip-shared SZIP)
- set (SZIP_SHARED_LIBRARY "${HDF_PACKAGE_NAMESPACE}szip-shared")
- set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_SHARED_LIBRARY})
+ if (USE_LIBAEC)
+ add_library(${HDF_PACKAGE_NAMESPACE}szip-static STATIC IMPORTED)
+ HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}szip-static "sz" STATIC "")
+ add_dependencies (${HDF_PACKAGE_NAMESPACE}szip-static SZIP)
+ add_library(${HDF_PACKAGE_NAMESPACE}szaec-static STATIC IMPORTED)
+ HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}szaec-static "aec" STATIC "")
+ add_dependencies (${HDF_PACKAGE_NAMESPACE}szaec-static SZIP)
+ set (SZIP_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}szip-static;${HDF_PACKAGE_NAMESPACE}szaec-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}")
set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src")
@@ -158,11 +152,15 @@ endmacro ()
#-------------------------------------------------------------------------------
macro (PACKAGE_SZIP_LIBRARY compress_type)
+ set (SZIP_HDR "SZconfig")
+ if (USE_LIBAEC)
+ set (SZIP_HDR "libaec_Export")
+ endif ()
add_custom_target (SZIP-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
+ 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}/SZconfig.h)
+ 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 ()
@@ -176,7 +174,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
GIT_TAG ${ZLIB_BRANCH}
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -195,7 +193,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
URL_MD5 ""
INSTALL_COMMAND ""
CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DBUILD_SHARED_LIBS:BOOL=OFF
-DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -224,14 +222,6 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
add_dependencies (${HDF_PACKAGE_NAMESPACE}zlib-static ZLIB)
set (ZLIB_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}zlib-static")
set (ZLIB_LIBRARIES ${ZLIB_STATIC_LIBRARY})
- if (BUILD_SHARED_LIBS)
- # Create imported target zlib-shared
- add_library(${HDF_PACKAGE_NAMESPACE}zlib-shared SHARED IMPORTED)
- HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}zlib-shared ${ZLIB_LIB_NAME} SHARED "")
- add_dependencies (${HDF_PACKAGE_NAMESPACE}zlib-shared ZLIB)
- set (ZLIB_SHARED_LIBRARY "${HDF_PACKAGE_NAMESPACE}zlib-shared")
- set (ZLIB_LIBRARIES ${ZLIB_LIBRARIES} ${ZLIB_SHARED_LIBRARY})
- endif ()
set (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}")
set (ZLIB_INCLUDE_DIR "${SOURCE_DIR}")
diff --git a/config/toolchain/build32.cmake b/config/toolchain/build32.cmake
index deb5899..207d03e 100644
--- a/config/toolchain/build32.cmake
+++ b/config/toolchain/build32.cmake
@@ -72,4 +72,4 @@ else ()
# for libraries and headers in the target directories
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-endif () \ No newline at end of file
+endif ()
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index 57cfd7e..2e47bc0 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -61,6 +61,7 @@ CMake build script:
CTestScript.cmake
External compression szip and zlib libraries:
+ LIBAEC.tar.gz
SZip.tar.gz
ZLib.tar.gz
@@ -475,6 +476,8 @@ These five steps are described in detail below.
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)
set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
@@ -550,12 +553,17 @@ These five steps are described in detail below.
file) are:
ZLIB_TGZ_NAME:STRING="zlib_src.ext"
SZIP_TGZ_NAME:STRING="szip_src.ext"
+ LIBAEC_TGZ_NAME:STRING="liaec_src.ext"
TGZPATH:STRING="some_location"
where "some_location/xxxx_src.ext" is the URL or full path to
the compressed file and where ext is the type of the compression
file such as .bz2, .tar, .tar.gz, .tgz, or .zip. Also define
CMAKE_BUILD_TYPE to be the configuration type.
+ NOTE: the USE_LIBAEC option will use the file named by LIBAEC_TGZ_NAME
+ to build SZIP instead of the file named by SZIP_TGZ_NAME. This option
+ is also used to account for the different headers and library names.
+
4. Test HDF5
To test the build, navigate to your build directory and execute:
@@ -676,6 +684,7 @@ ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB"
SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0
if (HDF5_ENABLE_SZIP_SUPPORT)
HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF
+ USE_LIBAEC "Use libaec szip replacement" OFF
if (WINDOWS)
H5_DEFAULT_PLUGINDIR "%ALLUSERSPROFILE%/hdf5/lib/plugin"
else ()
diff --git a/release_docs/README_HDF5_CMake b/release_docs/README_HDF5_CMake
index 126a4cd..3325e8c 100644
--- a/release_docs/README_HDF5_CMake
+++ b/release_docs/README_HDF5_CMake
@@ -7,7 +7,7 @@ This tar file contains
HDF5config.cmake CMake scripts for building HDF5
HDF5options.cmake
hdf5-1.10.7 HDF5 1.10.7 source
- SZip.tar.gz source for building SZIP
+ LIBAEC.tar.gz source for building SZIP replacement
ZLib.tar.gz source for building ZLIB
For more information about building HDF5 with CMake, see USING_HDF5_CMake.txt in
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 78f40bb..c8155c7 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -47,6 +47,16 @@ New Features
Configuration:
-------------
+ - CMake option to use AEC (open source SZip) library instead of SZip
+
+ The open source AEC library is a replacement library for SZip. In
+ order to use it for hdf5 the libaec CMake source was changed to add
+ "-fPIC" and exclude test files. Autotools does not build the
+ compression libraries within hdf5 builds. New option USE_LIBAEC is
+ required to compensate for the different files produced by AEC build.
+
+ (ADB - 2020/04/22, OESS-65)
+
- CMake ConfigureChecks.cmake file now uses CHECK_STRUCT_HAS_MEMBER
Some handcrafted tests in HDFTests.c has been removed and the CMake