diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2023-10-18 01:32:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-18 01:32:31 (GMT) |
commit | fc788559f7747eeefd152fc8c7844f45d3845300 (patch) | |
tree | 22005bc312b717267db6a176ac73abaf3ce5f1ae /CMakeFilters.cmake | |
parent | 2a3b511e96fbc468ef2b934eb169048e723a2f34 (diff) | |
download | hdf5-fc788559f7747eeefd152fc8c7844f45d3845300.zip hdf5-fc788559f7747eeefd152fc8c7844f45d3845300.tar.gz hdf5-fc788559f7747eeefd152fc8c7844f45d3845300.tar.bz2 |
Correct use of set() command with options (#3667) (#3703)
* Correct use of set() command with options
* Force filter off if not found
Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
Diffstat (limited to 'CMakeFilters.cmake')
-rw-r--r-- | CMakeFilters.cmake | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 042bfdc..da8e2c7 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -10,10 +10,9 @@ # help@hdfgroup.org. # option (USE_LIBAEC_STATIC "Use static AEC library " OFF) -option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 0) -option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 0) +option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" OFF) +option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" OFF) -set (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1) if (NOT ZLIB_USE_LOCALCONTENT) set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_NAME}) else () @@ -23,7 +22,6 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") message (VERBOSE "Filter ZLIB file is ${ZLIB_URL}") endif () -set (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1) if (NOT LIBAEC_USE_LOCALCONTENT) set (SZIP_URL ${LIBAEC_TGZ_ORIGPATH}/${LIBAEC_TGZ_NAME}) else () @@ -38,8 +36,8 @@ include (ExternalProject) set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)") set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - set (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1) - set (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1) + set (ZLIB_USE_EXTERNAL ON CACHE BOOL "Use External Library Building for ZLIB") + set (SZIP_USE_EXTERNAL ON CACHE BOOL "Use External Library Building for SZIP") if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT") set (ZLIB_URL ${ZLIB_GIT_URL} CACHE STRING "Path to zlib git repository") set (ZLIB_BRANCH ${ZLIB_GIT_BRANCH}) @@ -62,8 +60,10 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT endif () endif () else () - set (ZLIB_USE_EXTERNAL 0) - set (SZIP_USE_EXTERNAL 0) + set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE) + set (ZLIB_USE_EXTERNAL OFF CACHE BOOL "Use External Library Building for ZLIB") + set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE) + set (SZIP_USE_EXTERNAL OFF CACHE BOOL "Use External Library Building for SZIP") endif () endif () @@ -107,6 +107,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) message (VERBOSE "Filter HDF5_ZLIB is ON") else () + set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE) message (WARNING " ZLib support in HDF5 was enabled but not found") endif () endif () @@ -157,6 +158,7 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE") endif () else () + set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE) message (WARNING "SZIP support in HDF5 was enabled but not found") endif () endif () |