From d689fa3f28c026838a8d281c1751830360847d29 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 15 Oct 2023 19:09:39 +0200 Subject: [PATCH] assimp: Don't set `-Werror` Have to do this with a patch rather than just updating to v5.2.5 and relying on ASSIMP_WARNINGS_AS_ERRORS since that one doesn't build on Android --- CMakeLists.txt | 2 ++ patches/assimp-5.1.6-no-werror.patch | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 patches/assimp-5.1.6-no-werror.patch diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b572e6..52601bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -259,6 +259,8 @@ if(BUILD_ASSIMP) GIT_REPOSITORY https://github.com/assimp/assimp.git GIT_TAG 8134cae998ec0e3a44a6ec8330b681f3981107b7 #v5.1.6 + PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/patches/assimp-5.1.6-no-werror.patch + CMAKE_ARGS ${COMMON_CMAKE_ARGS} -DCMAKE_PREFIX_PATH=${THIRDPARTY_DIR}/zlib -DASSIMP_BUILD_TESTS=OFF diff --git a/patches/assimp-5.1.6-no-werror.patch b/patches/assimp-5.1.6-no-werror.patch new file mode 100644 index 0000000..e43c233 --- /dev/null +++ b/patches/assimp-5.1.6-no-werror.patch @@ -0,0 +1,25 @@ +diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt +index 08efd28df..e7cab6dc6 100644 +--- a/code/CMakeLists.txt ++++ b/code/CMakeLists.txt +@@ -1168,7 +1168,6 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp) + IF (MSVC) + TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX) + ELSE() +- TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror) + ENDIF() + + # adds C_FLAGS required to compile zip.c on old GCC 4.x compiler +diff --git a/contrib/zip/CMakeLists.txt b/contrib/zip/CMakeLists.txt +index bba4e7bde..98842b5e5 100644 +--- a/contrib/zip/CMakeLists.txt ++++ b/contrib/zip/CMakeLists.txt +@@ -45,7 +45,7 @@ if (MSVC) + elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR + "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR + "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra -Werror -pedantic -Wno-deprecated") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra -pedantic -Wno-deprecated") + endif (MSVC) + + ####