From 62c6b5a4562a80ddcf29fbc6d9e34716d64b975f Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 10 Jun 2014 11:58:58 -0700 Subject: [PATCH 1/3] fixup benchmark build flags --- benchmark/build.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/benchmark/build.py b/benchmark/build.py index e39d4d3ea..a4cde9e82 100644 --- a/benchmark/build.py +++ b/benchmark/build.py @@ -6,11 +6,16 @@ Import ('env') test_env = env.Clone() -test_env['LIBS'] = copy(env['LIBMAPNIK_LIBS']) -test_env.AppendUnique(LIBS=env['MAPNIK_NAME']) +test_env['LIBS'] = [env['MAPNIK_NAME']] +test_env.AppendUnique(LIBS=copy(env['LIBMAPNIK_LIBS'])) +if env['RUNTIME_LINK'] == 'static' and env['PLATFORM'] == 'Linux': + test_env.AppendUnique(LIBS='dl') test_env.AppendUnique(CXXFLAGS='-g') -if 'g++' in env['CXX']: - test_env.Append(CXXFLAGS='-fPIC') +test_env['CXXFLAGS'] = copy(test_env['LIBMAPNIK_CXXFLAGS']) +test_env.Append(CPPDEFINES = env['LIBMAPNIK_DEFINES']) +if test_env['HAS_CAIRO']: + test_env.PrependUnique(CPPPATH=test_env['CAIRO_CPPPATHS']) + test_env.Append(CPPDEFINES = '-DHAVE_CAIRO') if env['PLATFORM'] == 'Darwin': test_env.Append(LINKFLAGS='-F/ -framework CoreFoundation') From ccfa25cf264deb484731ece1a1786dc0d1fbeae8 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 10 Jun 2014 12:01:35 -0700 Subject: [PATCH 2/3] benchmark: also need -lrt on linux --- benchmark/build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmark/build.py b/benchmark/build.py index a4cde9e82..1b7ed02f6 100644 --- a/benchmark/build.py +++ b/benchmark/build.py @@ -10,6 +10,7 @@ test_env['LIBS'] = [env['MAPNIK_NAME']] test_env.AppendUnique(LIBS=copy(env['LIBMAPNIK_LIBS'])) if env['RUNTIME_LINK'] == 'static' and env['PLATFORM'] == 'Linux': test_env.AppendUnique(LIBS='dl') + test_env.AppendUnique(LIBS='rt') test_env.AppendUnique(CXXFLAGS='-g') test_env['CXXFLAGS'] = copy(test_env['LIBMAPNIK_CXXFLAGS']) test_env.Append(CPPDEFINES = env['LIBMAPNIK_DEFINES']) From e5dd7e0ec7b84c43efaa038b5c964ae515235446 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 12 Jun 2014 19:08:30 -0700 Subject: [PATCH 3/3] attempt to fix compile on linux --- include/mapnik/make_unique.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/mapnik/make_unique.hpp b/include/mapnik/make_unique.hpp index 0434cec78..aeda304a2 100644 --- a/include/mapnik/make_unique.hpp +++ b/include/mapnik/make_unique.hpp @@ -25,7 +25,9 @@ #include -namespace mapnik { +#if __cplusplus <= 201103L + +namespace std { // C++14 backfill from http://herbsutter.com/gotw/_102/ template @@ -34,5 +36,6 @@ inline std::unique_ptr make_unique(Args&& ...args) { } } +#endif #endif // MAPNIK_MAKE_UNIQUE_HPP