From 01649e0b933b6f3f044fca4e45c3a2c7b4ff62e3 Mon Sep 17 00:00:00 2001 From: Ed Date: Wed, 7 Aug 2024 13:15:19 -0600 Subject: [PATCH] only build tst_zstd with cmake when zstd is present --- nc_test4/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nc_test4/CMakeLists.txt b/nc_test4/CMakeLists.txt index 4ae83ac01a..1b14984080 100644 --- a/nc_test4/CMakeLists.txt +++ b/nc_test4/CMakeLists.txt @@ -23,7 +23,7 @@ SET(NC4_TESTS tst_dims tst_dims2 tst_dims3 tst_files tst_files4 tst_rename2 tst_rename3 tst_h5_endians tst_atts_string_rewrite tst_put_vars_two_unlim_dim tst_hdf5_file_compat tst_fill_attr_vanish tst_rehash tst_types tst_bug324 tst_atts3 tst_put_vars tst_elatefill tst_udf tst_bug1442 tst_broken_files - tst_quantize tst_h_transient_types tst_zstd) + tst_quantize tst_h_transient_types) IF(HAS_PAR_FILTERS) SET(NC4_tests $NC4_TESTS tst_alignment) @@ -102,6 +102,10 @@ IF(HAVE_H5Z_SZIP) ENDIF() ENDIF() +IF(HAVE_ZSTD) + BUILD_BIN_TEST(tst_zstd) +ENDIF() + # Copy some test files from current source dir to out-of-tree build dir. FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/ref_bzip2.c ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_SOURCE_DIR}/*.h5 ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl)