From 5b8c948c1d1b79ec4737230a184037ee20b01ccc Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Mon, 16 Oct 2023 14:59:26 +0200 Subject: [PATCH] tests: do not compile tests for the uncompressed codec if it is not enabled --- tests/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ddf8d85260..fd9d115a89 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -16,7 +16,7 @@ endmacro() # --- tests that require access to internal symbols if (WITH_REDUCED_VISIBILITY) - message("Conversion and JPEG 2000 box unit tests can only be compiled with full symbol visibility (WITH_REDUCED_VISIBILITY=OFF)") + message(WARNING "Conversion and JPEG 2000 box unit tests can only be compiled with full symbol visibility (WITH_REDUCED_VISIBILITY=OFF)") else() add_libheif_test(conversion) add_libheif_test(jpeg2000) @@ -26,6 +26,10 @@ endif() add_libheif_test(encode) add_libheif_test(region) -add_libheif_test(uncompressed_decode) -add_libheif_test(uncompressed_encode) +if (WITH_UNCOMPRESSED_CODEC) + add_libheif_test(uncompressed_decode) + add_libheif_test(uncompressed_encode) +else() + message(WARNING "Tests of the 'uncompressed codec' are not compiled because the uncompressed codec is not enabled (WITH_UNCOMPRESSED_CODEC==OFF)") +endif ()