From 15fa6f1e60a85d7c023d20ff1e48adc556ee48f9 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 11 Aug 2011 14:31:46 +0000 Subject: [PATCH] scons: add a WARNING_CXXFLAGS option which can be passed to place compiler warning modifiers after the default -Wall. This makes life better with the current clang/boost trunk warning - part of #805 --- SConstruct | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 5a57bd33d..f0436c174 100644 --- a/SConstruct +++ b/SConstruct @@ -296,6 +296,7 @@ opts.AddVariables( BoolVariable('DEBUG', 'Compile a debug version of Mapnik', 'False'), BoolVariable('XML_DEBUG', 'Compile a XML verbose debug version of mapnik', 'False'), ListVariable('INPUT_PLUGINS','Input drivers to include',DEFAULT_PLUGINS,PLUGINS.keys()), + ('WARNING_CXXFLAGS', 'Compiler flags you can set to reduce warning levels which are placed after -Wall.', ''), # SCons build behavior options ('CONFIG', "The path to the python file in which to save user configuration options. Currently : '%s'" % SCONS_LOCAL_CONFIG,SCONS_LOCAL_CONFIG), @@ -1296,7 +1297,7 @@ if not preconfigured: env.Append(CXXFLAGS = common_cxx_flags + '-O %s' % ndebug_flags) else: # Common flags for GCC. - gcc_cxx_flags = '-ansi -Wall %s -ftemplate-depth-200 %s' % (pthread, common_cxx_flags) + gcc_cxx_flags = '-ansi -Wall %s %s -ftemplate-depth-200 %s' % (pthread, env['WARNING_CXXFLAGS'], common_cxx_flags) if env['DEBUG']: env.Append(CXXFLAGS = gcc_cxx_flags + '-O0 -fno-inline %s' % debug_flags) else: