scons: Add warning for missing declarations

This patch enables warnings for missing declarations. To avoid issues
with SWIG-generated code, the warning is only applied to non-SWIG
code.
This commit is contained in:
Andreas Hansson
2013-02-19 05:56:07 -05:00
parent b44e0ce52b
commit 319443d42d
43 changed files with 181 additions and 9 deletions

View File

@@ -899,9 +899,17 @@ def makeEnv(label, objsfx, strip = False, **kwargs):
'-Wno-unused-value'])
if compareVersions(env['GCC_VERSION'], '4.6') >= 0:
swig_env.Append(CCFLAGS='-Wno-unused-but-set-variable')
# Add additional warnings here that should not be applied to
# the SWIG generated code
new_env.Append(CXXFLAGS='-Wmissing-declarations')
if env['CLANG']:
swig_env.Append(CCFLAGS=['-Wno-unused-label', '-Wno-unused-value'])
# Add additional warnings here that should not be applied to
# the SWIG generated code
new_env.Append(CXXFLAGS='-Wmissing-declarations')
werror_env = new_env.Clone()
werror_env.Append(CCFLAGS='-Werror')