diff --git a/SConstruct b/SConstruct index e8107ea2c7..bd26e4552e 100755 --- a/SConstruct +++ b/SConstruct @@ -420,6 +420,14 @@ for variant_path in variant_paths: conf.CheckLinkFlag('-Wl,--threads') conf.CheckLinkFlag( '-Wl,--thread-count=%d' % GetOption('num_jobs')) + + # Treat warnings as errors but white list some warnings that we + # want to allow (e.g., deprecation warnings). + env.Append(CCFLAGS=['-Werror', + '-Wno-error=deprecated-declarations', + '-Wno-error=deprecated', + ]) + else: error('\n'.join(( "Don't know what compiler options to use for your compiler.",