From 57aeaecc6b8e7d7a9fdbbc06a5cfab9cd4fbc146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Mon, 9 Dec 2024 11:15:29 +0100 Subject: [PATCH] libzip: backport warning suppression for gcc >= 14 (#26132) * Fix compilation in GCC >= 14 * Restrict to newer gccs --- recipes/libzip/all/conanfile.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes/libzip/all/conanfile.py b/recipes/libzip/all/conanfile.py index f6403b2c2308d..36f2fd4e220bc 100644 --- a/recipes/libzip/all/conanfile.py +++ b/recipes/libzip/all/conanfile.py @@ -93,6 +93,13 @@ def generate(self): tc.variables["BUILD_DOC"] = False tc.variables["ENABLE_LZMA"] = self.options.with_lzma tc.variables["ENABLE_BZIP2"] = self.options.with_bzip2 + if (self.settings.compiler == "gcc" + and Version(self.settings.compiler.version) >= "14" + and Version(self.version) < "1.11"): + # See https://github.com/conan-io/conan-center-index/issues/26034 + # It's an error in gcc >= 14 + # Upstream fixed this silencing this error implicitly from 1.11 + tc.extra_cflags.append("-Wno-incompatible-pointer-types") if self._has_zstd_support: tc.variables["ENABLE_ZSTD"] = self.options.with_zstd tc.variables["ENABLE_COMMONCRYPTO"] = False # TODO: We need CommonCrypto package