Move `ASSIMP_WARNINGS_AS_ERRORS` check

pull/4509/head
hgdagon 2022-05-03 13:01:20 -07:00 committed by GitHub
parent e1f0f50010
commit 936cc791f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -1179,6 +1179,15 @@ ADD_LIBRARY(assimp::assimp ALIAS assimp)
TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp)
IF (ASSIMP_WARNINGS_AS_ERRORS)
MESSAGE(STATUS "Treating all warnings as errors (for assimp library only)")
IF (MSVC)
TARGET_COMPILE_OPTIONS(assimp PRIVATE /W4 /WX)
ELSE()
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror)
ENDIF()
ENDIF()
# adds C_FLAGS required to compile zip.c on old GCC 4.x compiler
TARGET_COMPILE_FEATURES(assimp PRIVATE c_std_99)