1 # This file provides a special "standard_warnings" target which is supposed to
2 # be linked privately by all product and test code, but not by third party code.
3 add_library(standard_warnings INTERFACE)
6 # Enabled by default for developer builds.
7 option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" TRUE)
9 # Disabled by default for user builds so compilation doesn't fail with new
10 # compilers that may emit new warnings.
11 option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" FALSE)
15 set(CCACHE_COMPILER_WARNINGS -Wall)
19 include(DevModeWarnings)
22 target_compile_options(standard_warnings INTERFACE ${CCACHE_COMPILER_WARNINGS})