]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
build: Disable legacy support for downloaded zstd
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 31 Jan 2026 09:54:32 +0000 (10:54 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 31 Jan 2026 10:00:09 +0000 (11:00 +0100)
This avoids compiling zstd's lib/legacy/zstd_v01.c file which is seen to
trigger -Wmaybe-uninitialized warnings.

Closes #1679.

cmake/FindZstd.cmake

index e3fc4eb27d50f320e675219492092a5e69c30621..9a7ffa7874562f95e3b539ada20660236a6aab85 100644 (file)
@@ -39,6 +39,7 @@ if(_download_zstd)
   set(ZSTD_BUILD_SHARED OFF)
   set(ZSTD_BUILD_STATIC ON)
   set(ZSTD_BUILD_TESTS OFF)
+  set(ZSTD_LEGACY_SUPPORT OFF)
 
   include(FetchContent)
   FetchContent_Declare(
@@ -67,6 +68,7 @@ if(_download_zstd)
   unset(ZSTD_BUILD_SHARED)
   unset(ZSTD_BUILD_STATIC)
   unset(ZSTD_BUILD_TESTS)
+  unset(ZSTD_LEGACY_SUPPORT)
 
   set(_zstd_origin DOWNLOADED)
   add_library(dep_zstd ALIAS libzstd_static)