From 8d4bd56217ab8f2701bc3f2fa643dcf45d460343 Mon Sep 17 00:00:00 2001 From: Hans Kristian Rosbach Date: Tue, 11 Nov 2025 17:24:26 +0100 Subject: Use CTest to simplify testing options Add CMake variable TEST_STOCK_ZLIB to disable some tests if attempting to run our testsuite on stock zlib. PR depends on CMP0077, introduced by CMake 3.13. Upped minimum compatible CMake version to 3.13, same as we have actually been telling people was the minumum for years on the wiki. Upped upper compatible CMake version to 3.31, my current version. --- test/example.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/example.c') diff --git a/test/example.c b/test/example.c index 5393fa5de9..fd62bd5d7f 100644 --- a/test/example.c +++ b/test/example.c @@ -420,7 +420,7 @@ static void test_flush(unsigned char *compr, z_uintmax_t *comprLen) { *comprLen = (z_size_t)c_stream.total_out; } -#ifdef ZLIBNG_ENABLE_TESTS +#ifndef TEST_STOCK_ZLIB /* =========================================================================== * Test inflateSync() * We expect a certain compressed block layout, so skip this with the original zlib. @@ -979,7 +979,7 @@ int main(int argc, char *argv[]) { #endif test_flush(compr, &comprLen); -#ifdef ZLIBNG_ENABLE_TESTS +#ifndef TEST_STOCK_ZLIB test_sync(compr, comprLen, uncompr, uncomprLen); #endif comprLen = uncomprLen; -- cgit 0.0.5-2-1-g0f52