Merge pull request #2270 from mapnik/make_unique

Fixes compile in c++11 mode
This commit is contained in:
Dane Springmeyer 2014-06-12 20:28:03 -07:00
commit 16073a4742
2 changed files with 14 additions and 5 deletions

View file

@ -6,11 +6,17 @@ Import ('env')
test_env = env.Clone() test_env = env.Clone()
test_env['LIBS'] = copy(env['LIBMAPNIK_LIBS']) test_env['LIBS'] = [env['MAPNIK_NAME']]
test_env.AppendUnique(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.AppendUnique(CXXFLAGS='-g')
if 'g++' in env['CXX']: test_env['CXXFLAGS'] = copy(test_env['LIBMAPNIK_CXXFLAGS'])
test_env.Append(CXXFLAGS='-fPIC') 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': if env['PLATFORM'] == 'Darwin':
test_env.Append(LINKFLAGS='-F/ -framework CoreFoundation') test_env.Append(LINKFLAGS='-F/ -framework CoreFoundation')

View file

@ -25,7 +25,9 @@
#include <memory> #include <memory>
namespace mapnik { #if __cplusplus <= 201103L
namespace std {
// C++14 backfill from http://herbsutter.com/gotw/_102/ // C++14 backfill from http://herbsutter.com/gotw/_102/
template<typename T, typename ...Args> template<typename T, typename ...Args>
@ -34,5 +36,6 @@ inline std::unique_ptr<T> make_unique(Args&& ...args) {
} }
} }
#endif
#endif // MAPNIK_MAKE_UNIQUE_HPP #endif // MAPNIK_MAKE_UNIQUE_HPP