CMAKE_COMPILE_WARNING_AS_ERROR was added to CMake in 3.24.
--compile-no-warning-as-error can be used, if needed, in future, to
suppress the CMAKE_COMPILE_WARNING_AS_ERROR behaviour from a CI
config.
Potential alternative to #33297. Closes #33284.
See https://cmake.org/cmake/help/latest/prop_tgt/COMPILE_WARNING_AS_ERROR.html.