From 5dd79e88c051cec702ad1aca13dfc1f6e7d087e1 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 19 Aug 2014 09:06:40 -0700 Subject: [PATCH] fix css_grammar compile error with boost 1.56 - close #2366 Conflicts: SConstruct --- SConstruct | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SConstruct b/SConstruct index de9ea8913..4bd700e9d 100644 --- a/SConstruct +++ b/SConstruct @@ -1623,6 +1623,15 @@ if not preconfigured: debug_defines = ['-DDEBUG', '-DMAPNIK_DEBUG'] ndebug_defines = ['-DNDEBUG'] + boost_version_from_header = int(env['BOOST_LIB_VERSION_FROM_HEADER'].split('_')[1]) + if boost_version_from_header > 53 or 'c++11' in env['CUSTOM_CXXFLAGS']: + env.Append(CPPDEFINES = '-DBOOST_SPIRIT_USE_PHOENIX_V3=1') + # - workaround boost gil channel_algorithm.hpp narrowing error + # TODO - remove when building against >= 1.55 + # https://github.com/mapnik/mapnik/issues/1970 + if 'clang++' in env['CXX']: + env.Append(CXXFLAGS = '-Wno-c++11-narrowing') + # Enable logging in debug mode (always) and release mode (when specified) if env['DEFAULT_LOG_SEVERITY']: if env['DEFAULT_LOG_SEVERITY'] not in severities: