Skip to content

Commit

Permalink
assimp: Don't set -Werror
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rdb committed Oct 15, 2023
1 parent c782c3e commit d689fa3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 25 additions & 0 deletions patches/assimp-5.1.6-no-werror.patch
Original file line number Diff line number Diff line change
@@ -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)

####

0 comments on commit d689fa3

Please sign in to comment.