Make all warnings fatal in CI builds
This MR:
- enables a feature that enforces all compiler/linker warnings reported as errors (
-Werrors or /WX
, depending on compiler)- also replaces
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
calls with genericadd_compile_options()
. - also adds
-Werror=return-type
to regular (i.e. non-Werror) gcc/clang builds. En equivalent C4716 on msvc is already an error by default.- The
-Werror=
list could be extended further for known warnings that we otherwise want to be firm failures.
- The
- also replaces
- enables that feature in CI builds
- also enables CMake's own warnings to be reported as errors in CI builds
- requires having non-REQUIRED
find_package()
calls beQUIET
ed to not throw the CMake Module/Config not found warnings - this, however, seems to be affecting
cmake_dependent_option()
calls, see: https://gitlab.kitware.com/cmake/cmake/-/issues/23959
- requires having non-REQUIRED
- enables additional model tests in CI builds
- fixes compilation warnings with gcc, clang and msvc
- fixes CMake warnings, particularly regarding outdated/missing policy declarations
- adds missing KF5 dependencies to .kde-ci, in order to enable compilation of optional plugins
- some plugins, which depend on autotools libs, lik aqbanking, are still not available on some platforms, though
Edited by Dawid Wrobel