Merge branch 'patch-57' of https://github.com/gsjaardema/netcdf-c into gh2712-parity.wif

This commit is contained in:
Ward Fisher 2023-07-20 13:51:12 -06:00
commit 4a092c7f5d

View File

@ -1110,24 +1110,40 @@ macro(set_std_filter filter)
# Upper case the filter name
string(TOUPPER "${filter}" upfilter)
string(TOLOWER "${filter}" downfilter)
if(ENABLE_${upfilter})
# Define a test flag for filter
IF(${filter}_FOUND)
INCLUDE_DIRECTORIES(${${filter}_INCLUDE_DIRS})
SET(ENABLE_${upfilter} TRUE)
SET(HAVE_${upfilter} ON)
SET(STD_FILTERS "${STD_FILTERS} ${downfilter}")
MESSAGE(">>> Standard Filter: ${downfilter}")
IF(${filter}_FOUND)
INCLUDE_DIRECTORIES(${${filter}_INCLUDE_DIRS})
SET(ENABLE_${upfilter} TRUE)
SET(HAVE_${upfilter} ON)
SET(STD_FILTERS "${STD_FILTERS} ${downfilter}")
MESSAGE(">>> Standard Filter: ${downfilter}")
ELSE()
SET(ENABLE_${upfilter} FALSE)
SET(HAVE_${upfilter} OFF)
ENDIF()
ELSE()
SET(ENABLE_${upfilter} FALSE)
SET(HAVE_${upfilter} OFF)
ENDIF()
endmacro(set_std_filter)
# Locate some compressors
FIND_PACKAGE(Szip)
FIND_PACKAGE(Bz2)
FIND_PACKAGE(Blosc)
FIND_PACKAGE(Zstd)
OPTION(ENABLE_SZIP "Enable use of Szip compression library if it is available." ON)
OPTION(ENABLE_BZ2 "Enable use of Bz2 compression library if it is available." ON)
OPTION(ENABLE_BLOSC "Enable use of blosc compression library if it is available." ON)
OPTION(ENABLE_ZSTD "Enable use of Zstd compression library if it is available." ON)
IF (ENABLE_SZIP)
FIND_PACKAGE(Szip)
ENDIF()
IF (ENABLE_BZ2)
FIND_PACKAGE(Bz2)
ENDIF()
IF (ENABLE_BLOSC)
FIND_PACKAGE(Blosc)
ENDIF()
IF (ENABLE_ZSTD)
FIND_PACKAGE(Zstd)
ENDIF()
# Accumulate standard filters
set(STD_FILTERS "deflate") # Always have deflate*/