diff options
Diffstat (limited to 'app-arch/libdeflate/files/libdeflate-1.19-make-gzip-tests-conditional.patch')
-rw-r--r-- | app-arch/libdeflate/files/libdeflate-1.19-make-gzip-tests-conditional.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app-arch/libdeflate/files/libdeflate-1.19-make-gzip-tests-conditional.patch b/app-arch/libdeflate/files/libdeflate-1.19-make-gzip-tests-conditional.patch new file mode 100644 index 000000000000..ae290f3f69d2 --- /dev/null +++ b/app-arch/libdeflate/files/libdeflate-1.19-make-gzip-tests-conditional.patch @@ -0,0 +1,37 @@ +Only build these when the user enables zlib and gzip support +diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt +index e707a25..fcfaf12 100644 +--- a/programs/CMakeLists.txt ++++ b/programs/CMakeLists.txt +@@ -80,22 +80,28 @@ if(LIBDEFLATE_BUILD_TESTS) + target_link_libraries(libdeflate_test_utils PUBLIC + libdeflate_prog_utils ZLIB::ZLIB) + ++ if(LIBDEFLATE_GZIP_SUPPORT AND LIBDEFLATE_ZLIB_SUPPORT) + # Build the benchmark and checksum programs. + add_executable(benchmark benchmark.c) + target_link_libraries(benchmark PRIVATE libdeflate_test_utils) + add_executable(checksum checksum.c) + target_link_libraries(checksum PRIVATE libdeflate_test_utils) ++ endif() + + # Build the unit test programs and register them with CTest. + set(UNIT_TEST_PROGS +- test_checksums + test_custom_malloc + test_incomplete_codes + test_invalid_streams + test_litrunlen_overflow + test_overread + test_slow_decompression +- test_trailing_bytes + ) ++ if(LIBDEFLATE_GZIP_SUPPORT AND LIBDEFLATE_ZLIB_SUPPORT) ++ list(APPEND UNIT_TEST_PROGS ++ test_checksums ++ test_trailing_bytes ++ ) ++ endif() + foreach(PROG ${UNIT_TEST_PROGS}) + add_executable(${PROG} ${PROG}.c) + target_link_libraries(${PROG} PRIVATE libdeflate_test_utils) |