0006-lib-zstd-only-enable-CXX-support-if-tests-are-requir.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. From b6d898185d441e00acad867c0c80aadf4d7b0d37 Mon Sep 17 00:00:00 2001
  2. From: Thomas Devoogdt <thomas@devoogdt.com>
  3. Date: Tue, 1 Apr 2025 22:43:30 +0200
  4. Subject: [PATCH] lib: zstd: only enable CXX support if tests are required
  5. Upstream: https://github.com/facebook/zstd/pull/4357/files
  6. Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
  7. ---
  8. lib/zstd-1.5.7/build/cmake/CMakeLists.txt | 2 +-
  9. 1 file changed, 1 insertion(+), 1 deletion(-)
  10. diff --git a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
  11. index 347d41c0f..70e233df3 100644
  12. --- a/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
  13. +++ b/lib/zstd-1.5.7/build/cmake/CMakeLists.txt
  14. @@ -37,7 +37,6 @@ project(zstd
  15. VERSION "${ZSTD_FULL_VERSION}"
  16. LANGUAGES C # Main library is in C
  17. ASM # And ASM
  18. - CXX # Testing contributed code also utilizes CXX
  19. )
  20. message(STATUS "ZSTD VERSION: ${zstd_VERSION}")
  21. @@ -170,6 +169,7 @@ if (ZSTD_BUILD_PROGRAMS)
  22. endif ()
  23. if (ZSTD_BUILD_TESTS)
  24. + enable_language(CXX)
  25. enable_testing()
  26. if (NOT ZSTD_BUILD_STATIC)
  27. message(SEND_ERROR "You need to build static library to build tests")
  28. --
  29. 2.43.0