From 936cc791f2cd7b4f88dda36d8b6365277a9e718d Mon Sep 17 00:00:00 2001 From: hgdagon Date: Tue, 3 May 2022 13:01:20 -0700 Subject: [PATCH] Move `ASSIMP_WARNINGS_AS_ERRORS` check --- code/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index e30a2cd0a..d2488d6f2 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -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)