From 02c2338c431c2cf1aa0ff1da90ce44b36cd4eab7 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 31 Aug 2016 11:09:11 -0700 Subject: [PATCH] mapnik-config: strip clang specific warning flags --- utils/mapnik-config/build.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/utils/mapnik-config/build.py b/utils/mapnik-config/build.py index e4178ba41..35a730bf0 100644 --- a/utils/mapnik-config/build.py +++ b/utils/mapnik-config/build.py @@ -80,7 +80,15 @@ def write_config(configuration,template,config_file): os.chmod(config_file,0755) except: pass -cxxflags = ' '.join(config_env['LIBMAPNIK_CXXFLAGS']) + +cxxflags_raw = config_env['LIBMAPNIK_CXXFLAGS']; +# strip clang specific flags to avoid breaking gcc +# while it is not recommended to mix compilers, this nevertheless +# makes it easier to compile apps with gcc and mapnik-config against mapnik built with clang +to_remove = ['-Wno-unsequenced','-Wno-unknown-warning-option','-Wtautological-compare','-Wheader-hygiene'] +cxxflags_cleaned = [item for item in config_env['LIBMAPNIK_CXXFLAGS'] if item not in to_remove]; + +cxxflags = ' '.join(cxxflags_cleaned) defines = ' '.join(config_env['LIBMAPNIK_DEFINES'])