cmake: Allow deprecation warnings
authorManuel Nickschas <sputnick@quassel-irc.org>
Mon, 15 Jun 2020 23:51:34 +0000 (01:51 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 18 Jun 2020 19:43:46 +0000 (21:43 +0200)
commitc9d498c1d165c23cb854a8fbe9482a9289029071
tree94524381fdb676d08ec0ea244019415f04c356b1
parent1193d9d1f3f7c1c26e2c659b137046a31fe43bb4
cmake: Allow deprecation warnings

In recent releases, Qt deprecated a whole bunch of APIs, probably
in preparation of the advent of Qt 6. Unfortunately, avoiding those
is not straightforward, since Quassel has to support a broad range
of older Qt releases, and not all deprecated APIs are easy to replace
in those older versions. Some APIs, such as bearer management, don't
even have a replacement yet.

Since Qt 5.13, deprecation warnings cannot be disabled at all. To
avoid breaking the CI builds, make deprecation warnings non-fatal
even if FATAL_WARNINGS is enabled. This allows us to remove the
WARN_QT_DEPRECATION option, which only had an effect when building
against Qt < 5.13 anyway, and unconditionally enable the warnings
when compiling with GCC or Clang.

For MSVC, disable deprecation warnings completely, since there
seems to be no way to selectively make warnings non-fatal, and we
still want to fail for anything other than deprecations.

Disable the use of APIs completely that were deprecated in Qt 5.5
(our current baseline) or earlier to prevent accidental use.
This threshold can be raised in the future as we can rely on newer
Qt versions and modernize affected code.
CMakeLists.txt
cmake/QuasselCompileSettings.cmake