[PATCH] assimp: use CXXFLAGS to suppress GCC 16 unused-but-set-variable error

Ashwin Prabhakar <[email protected]>
Newsgroups org.openembedded.lists.openembedded-devel
Message-ID <[email protected]>
The CMake option -DASSIMP_WARNINGS_AS_ERRORS=OFF is not reliably honored
by the upstream build system, so the build still fails with GCC 16.
Instead, pass -Wno-error=unused-but-set-variable via CXXFLAGS to
directly override the compiler behavior regardless of how upstream
manages -Werror.

Signed-off-by: Ashwin Prabhakar <[email protected]>
---
 meta-oe/recipes-graphics/assimp/assimp_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-graphics/assimp/assimp_git.bb b/meta-oe/recipes-graphics/assimp/assimp_git.bb
index 4cf2d1f787..32c5cdebb1 100644
--- a/meta-oe/recipes-graphics/assimp/assimp_git.bb
+++ b/meta-oe/recipes-graphics/assimp/assimp_git.bb
@@ -17,10 +17,11 @@ PV = "5.x+git${SRCPV}"
 
 inherit cmake
 
+CXXFLAGS += "-Wno-error=unused-but-set-variable"
+
 EXTRA_OECMAKE = "\
     -DASSIMP_BUILD_ASSIMP_TOOLS=OFF \
     -DASSIMP_BUILD_TESTS=OFF \
-    -DASSIMP_WARNINGS_AS_ERRORS=OFF \
     -DASSIMP_LIB_INSTALL_DIR=${baselib} \
     -DCMAKE_INSTALL_PREFIX=${prefix} \
     -DCMAKE_INSTALL_LIBDIR=${baselib} \
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.