From f2ddc997f0f9f711fb9e9e05f80d1d0fa9b43d1a Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Thu, 4 May 2023 16:09:05 +0200 Subject: [PATCH] Temporary workaround for GCC 13 compiler warnings. --- cmake/EthCompilerSettings.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake index 01eee4b98..54a782c6e 100644 --- a/cmake/EthCompilerSettings.cmake +++ b/cmake/EthCompilerSettings.cmake @@ -65,6 +65,19 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA if(WEXTRA_SEMI) add_compile_options($<$:-Wextra-semi>) endif() + # TODO: This is a temporary workaround. The underlying warning should be addressed and this workaround removed ASAP. + check_cxx_compiler_flag(-Wno-error=overloaded-virtual=1 WNO_ERROR_OVERLOADED_VIRTUAL) + if (WNO_ERROR_OVERLOADED_VIRTUAL) + add_compile_options($<$:-Wno-error=overloaded-virtual=1>) + endif() + # TODO: This is a temporary workaround. The underlying warning should be addressed and this workaround removed ASAP. + # Once https://github.com/fmtlib/fmt/issues/3415 is addressed, this can be fixed by bumping the fmtlib version. + check_cxx_compiler_flag(-Wno-error=dangling-reference WNO_ERROR_DANGLING_REFERENCE) + if (WNO_ERROR_DANGLING_REFERENCE) + add_compile_options($<$:-Wno-error=dangling-reference>) + endif() + + eth_add_cxx_compiler_flag_if_supported(-Wfinal-dtor-non-final-class) eth_add_cxx_compiler_flag_if_supported(-Wnewline-eof) eth_add_cxx_compiler_flag_if_supported(-Wsuggest-destructor-override)