From 88001d1609b28adbb3039f09ca114f646fcfc3da Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Tue, 26 Jan 2021 17:56:39 +0000 Subject: [PATCH] Disable clang/gcc warnings for Draco --- CMakeLists.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2eba4d9e6..5c94b4018 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -584,10 +584,21 @@ IF ( ASSIMP_BUILD_DRACO ) hunter_add_package(draco) find_package(draco CONFIG REQUIRED) ELSE() - # Draco 1.4.1 has several nasty warnings and will not build with /WX + # Draco 1.4.1 has many warnings and will not build with /WX or -Werror + # See https://github.com/google/draco/issues/672 + # and IF(MSVC) set(DRACO_CXX_FLAGS "/W0") + ELSE() + list(APPEND DRACO_CXX_FLAGS + "-Wno-bool-compare" + "-Wno-comment" + "-Wno-maybe-uninitialized" + "-Wno-sign-compare" + "-Wno-unused-local-typedefs" + ) ENDIF() + ADD_SUBDIRECTORY( "contrib/draco" ) if(MSVC OR WIN32)