From ae9573e7afe92bf0d711771acd3267289547a6c6 Mon Sep 17 00:00:00 2001 From: David Wells Date: Mon, 2 Jan 2017 12:54:51 -0500 Subject: [PATCH] Silence unused typedef warnings in release mode. There are many places in the library where we use a typedef in just debug mode, so disable the warning in release mode. --- cmake/setup_compiler_flags_gnu.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/setup_compiler_flags_gnu.cmake b/cmake/setup_compiler_flags_gnu.cmake index 461c8107ee..0237d092ac 100644 --- a/cmake/setup_compiler_flags_gnu.cmake +++ b/cmake/setup_compiler_flags_gnu.cmake @@ -158,6 +158,13 @@ IF (CMAKE_BUILD_TYPE MATCHES "Release") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-loops") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-all-loops") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-fstrict-aliasing") + + # + # There are many places in the library where we create a new typedef and then + # immediately use it in an Assert. Hence, only ignore unused typedefs in Release + # mode. + # + ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-Wno-unused-local-typedefs") ENDIF() -- 2.39.5