From cd8b613fdedc1990bdcad7dee2cd79a7c690a088 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Wed, 16 Dec 2020 14:11:03 +0100 Subject: [PATCH 1/1] cmake: Ignore -Wdeprecated-declarations instead of -Wdeprecated Qt 5.15 introduced a bunch of deprecation warnings that are hard to fix due to our long-term support of old Qt versions. For this reason, we added -Wno-error=deprecated to compile flags, which should make deprecation warnings non-fatal. However, for some reason, GCC 10.2.1 on Debian Testing thinks that -Wno-error=deprecated should not include -Wdeprecated-declarations, thus failing the build with fatal warnings on. I could not reproduce this behavior on other distros with the same compiler and Qt versions, so maybe this is a distro-specific issue. However, we only care about -Wdeprecated-declarations, so making only this specific warning non-fatal makes more sense anyway. --- cmake/QuasselCompileSettings.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QuasselCompileSettings.cmake b/cmake/QuasselCompileSettings.cmake index 4493d4d2..014d4b30 100644 --- a/cmake/QuasselCompileSettings.cmake +++ b/cmake/QuasselCompileSettings.cmake @@ -45,7 +45,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") -Wvla -Werror=return-type "$<$:-Werror>" - -Wno-error=deprecated # Don't break on Qt upgrades + -Wno-error=deprecated-declarations # Don't break on Qt upgrades -Wno-unknown-pragmas "$<$>:-U_FORTIFY_SOURCE;-D_FORTIFY_SOURCE=2>" ) -- 2.20.1