diff --git a/SConstruct b/SConstruct index ce9e9b6c5f..8e7ec3481e 100755 --- a/SConstruct +++ b/SConstruct @@ -337,6 +337,12 @@ if main['GCC'] or main['CLANG']: main.Append(PSHLINKFLAGS=shared_partial_flags) main.Append(PLINKFLAGS=shared_partial_flags) + # Treat warnings as errors but white list some warnings that we + # want to allow (e.g., deprecation warnings). + main.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.",