Skip to content

Remove -Werror from CMakeLists

Michael Platings requested to merge remove-werror into main

-Werror causes an error if an ignorable warning is found. This is beneficial during development because it ensures that warnings are fixed, but it is harmful for deployment since it can turn warnings that may be spurious into blockers for a user to build the project.

Therefore don't specify -Werror in CMakeLists that must be used to build the project. Instead specify it in outer build scripts that a user will typically bypass.

The idiomatic way to specify -Werror in CMake 3.24 and later is to use CMAKE_COMPILE_WARNING_AS_ERROR so use that.

Merge request reports

Loading