When compiling with GCC v7 and the `-Werror` flag several new warnings
caused the build to fail: https://hydra.nixos.org/build/70751457/nixlog/2
Note: I patched the CMake file manually as v4.3.0 is quite old, a v5 is
in progress, but isn't stable yet, so patching v4 seems to be the better
solution taking stability into account.
See tickets #31747 and #36453