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.
-Wvla
-Werror=return-type
"$<$<BOOL:${FATAL_WARNINGS}>:-Werror>"
- -Wno-error=deprecated # Don't break on Qt upgrades
+ -Wno-error=deprecated-declarations # Don't break on Qt upgrades
-Wno-unknown-pragmas
"$<$<NOT:$<CONFIG:Debug>>:-U_FORTIFY_SOURCE;-D_FORTIFY_SOURCE=2>"
)