]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake/modules/BuildQATzip: Disable errors
authorMatan Breizman <mbreizma@redhat.com>
Sun, 16 Feb 2025 13:18:18 +0000 (13:18 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 20 Feb 2025 14:18:12 +0000 (14:18 +0000)
qatzip/configure.ac enables -Werror. However, newer compilers
(e.g clang 16) will not compile with the existing warnings
identified. The fixes for the warnings are not merged yet [1]
in the submodule. Until then, in order to allow for compiler
upgrade - we should disable the problematic errors.

[1] https://github.com/intel/QATzip/pull/119

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
cmake/modules/BuildQATzip.cmake

index 91cb43c822de5e8621a6c0355ead24b1f6200f00..70fafb8f548b57cd373b1cd7fa0b52f2e8097a37 100644 (file)
@@ -11,16 +11,21 @@ function(build_qatzip)
   set(configure_cmd env CC=${CMAKE_C_COMPILER} ./configure --prefix=${QATzip_INSTALL_DIR})
   # build a static library with -fPIC that we can link into crypto/compressor plugins
   list(APPEND configure_cmd --with-pic --enable-static --disable-shared)
+
+  set(CFLAGS "-Wno-error=strict-prototypes -Wno-error=unused-but-set-variable")
   if(QATDRV_INCLUDE_DIR)
     list(APPEND configure_cmd --with-ICP_ROOT=${QATDRV_INCLUDE_DIR})
   endif()
   if(QAT_INCLUDE_DIR)
-    list(APPEND configure_cmd CFLAGS=-I${QAT_INCLUDE_DIR})
+    list(APPEND CFLAGS -I${QAT_INCLUDE_DIR})
   endif()
   if(QAT_LIBRARY_DIR)
     list(APPEND configure_cmd LDFLAGS=-L${QAT_LIBRARY_DIR})
   endif()
 
+  list(JOIN CFLAGS " " CFLAGS)
+  list(APPEND configure_cmd CFLAGS=${CFLAGS})
+
   # clear the DESTDIR environment variable from debian/rules,
   # because it messes with the internal install paths of arrow's bundled deps
   set(NO_DESTDIR_COMMAND ${CMAKE_COMMAND} -E env --unset=DESTDIR)