summaryrefslogtreecommitdiffstats
path: root/CMakeFilters.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeFilters.cmake')
-rw-r--r--CMakeFilters.cmake56
1 files changed, 32 insertions, 24 deletions
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index a55d7ae..82dc6fa 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -58,16 +58,20 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
if (NOT BUILD_ZLIB_WITH_FETCHCONTENT)
set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
endif ()
- if (NOT EXISTS "${ZLIB_URL}")
- set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
- message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found")
+ if (ZLIB_USE_LOCALCONTENT)
+ if (NOT EXISTS "${ZLIB_URL}")
+ set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
+ message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found")
+ endif ()
endif ()
if (NOT BUILD_SZIP_WITH_FETCHCONTENT)
set (SZIP_URL ${TGZPATH}/${SZAEC_TGZ_NAME})
endif ()
- if (NOT EXISTS "${SZIP_URL}")
- set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
- message (VERBOSE "Filter SZIP file ${SZIP_URL} not found")
+ if (LIBAEC_USE_LOCALCONTENT)
+ if (NOT EXISTS "${SZIP_URL}")
+ set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
+ message (VERBOSE "Filter SZIP file ${SZIP_URL} not found")
+ endif ()
endif ()
else ()
set (ZLIB_USE_EXTERNAL 0)
@@ -78,7 +82,7 @@ endif ()
#-----------------------------------------------------------------------------
# Option for ZLib support
#-----------------------------------------------------------------------------
-option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
+option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON)
if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (NOT H5_ZLIB_HEADER)
if (NOT ZLIB_USE_EXTERNAL)
@@ -111,8 +115,6 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
set (H5_HAVE_LIBZ 1)
message (VERBOSE "Filter HDF5_ZLIB is built")
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY})
- else ()
- message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5")
endif ()
endif ()
else ()
@@ -121,11 +123,15 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
set (H5_HAVE_ZLIB_H 1)
set (H5_HAVE_LIBZ 1)
endif ()
- if (H5_HAVE_FILTER_DEFLATE)
- set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
+ if (ZLIB_FOUND)
+ if (H5_HAVE_FILTER_DEFLATE)
+ set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
+ endif ()
+ INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
+ message (VERBOSE "Filter HDF5_ZLIB is ON")
+ else ()
+ message (WARNING " ZLib support in HDF5 was enabled but not found")
endif ()
- INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
- message (VERBOSE "Filter HDF5_ZLIB is ON")
endif ()
#-----------------------------------------------------------------------------
@@ -133,7 +139,7 @@ endif ()
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
if (HDF5_ENABLE_SZIP_SUPPORT)
- option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
+ option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON)
if (NOT SZIP_USE_EXTERNAL)
set(SZIP_FOUND FALSE)
set(libaec_USE_STATIC_LIBS ${USE_LIBAEC_STATIC})
@@ -173,17 +179,19 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
message (VERBOSE "Filter SZIP is built")
message (VERBOSE "... with library AEC")
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY})
- else ()
- message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
endif ()
endif ()
- INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
- message (VERBOSE "Filter SZIP is ON")
- if (H5_HAVE_FILTER_SZIP)
- set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
- endif ()
- if (HDF5_ENABLE_SZIP_ENCODING)
- set (H5_HAVE_SZIP_ENCODER 1)
- set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
+ if (SZIP_FOUND)
+ INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
+ message (VERBOSE "Filter SZIP is ON")
+ if (H5_HAVE_FILTER_SZIP)
+ set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
+ endif ()
+ if (HDF5_ENABLE_SZIP_ENCODING)
+ set (H5_HAVE_SZIP_ENCODER 1)
+ set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
+ endif ()
+ else ()
+ message (WARNING "SZIP support in HDF5 was enabled but not found")
endif ()
endif ()