From aa7cb880c7455aaacca1ecbfade57c1d3d4ceb20 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 14 Aug 2024 12:32:49 -0500 Subject: [PATCH] CMake: set -Wno-unused-parameter in release mode --- cmake/setup_compiler_flags_gnu.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/setup_compiler_flags_gnu.cmake b/cmake/setup_compiler_flags_gnu.cmake index 321dbfd314..a352c98392 100644 --- a/cmake/setup_compiler_flags_gnu.cmake +++ b/cmake/setup_compiler_flags_gnu.cmake @@ -169,11 +169,13 @@ if (CMAKE_BUILD_TYPE MATCHES "Release") list(APPEND DEAL_II_DEFINITIONS_RELEASE "NDEBUG") # - # 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. + # There are many places in the library where we + # - create a new typedef and then only use it in an Assert. + # - use a function parameter only in an Assert. + # Thus disable these two warnings in release mode. # enable_if_supported(DEAL_II_CXX_FLAGS_RELEASE "-Wno-unused-local-typedefs") + enable_if_supported(DEAL_II_CXX_FLAGS_RELEASE "-Wno-unused-parameter") endif() -- 2.39.5