diff --git a/bindings/python/mapnik_enumeration.hpp b/bindings/python/mapnik_enumeration.hpp index 294facaab..1c665fd6e 100644 --- a/bindings/python/mapnik_enumeration.hpp +++ b/bindings/python/mapnik_enumeration.hpp @@ -47,15 +47,8 @@ public: { init(); } -#if BOOST_VERSION >= 103500 enumeration_(const char * python_alias, const char * doc) : base_type( python_alias, doc ) -#else - enumeration_(const char * python_alias, const char * /*doc*/) : - // Boost.Python < 1.35.0 doesn't support - // docstrings for enums so we ignore it. - base_type( python_alias ) -#endif { init(); } diff --git a/bindings/python/mapnik_geometry.cpp b/bindings/python/mapnik_geometry.cpp index 387be3e17..fc53160d8 100644 --- a/bindings/python/mapnik_geometry.cpp +++ b/bindings/python/mapnik_geometry.cpp @@ -38,11 +38,9 @@ #include #include -#if BOOST_VERSION >= 104700 #include #include #include -#endif // stl #include @@ -132,7 +130,6 @@ inline std::string boost_version() return s.str(); } -#if BOOST_VERSION >= 104700 PyObject* to_wkb( geometry_type const& geom, mapnik::util::wkbByteOrder byte_order) { mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(geom,byte_order); @@ -151,16 +148,7 @@ PyObject* to_wkb( geometry_type const& geom, mapnik::util::wkbByteOrder byte_ord Py_RETURN_NONE; } } -#else -PyObject* to_wkb( geometry_type const& geom) -{ - throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost " - + boost_version()); -} -#endif - -#if BOOST_VERSION >= 104700 PyObject* to_wkb2( path_type const& p, mapnik::util::wkbByteOrder byte_order) { mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(p,byte_order); @@ -179,18 +167,9 @@ PyObject* to_wkb2( path_type const& p, mapnik::util::wkbByteOrder byte_order) Py_RETURN_NONE; } } -#else -PyObject* to_wkb2( path_type const& p) -{ - throw std::runtime_error("mapnik::to_wkb() requires at least boost 1.47 while your build was compiled against boost " - + boost_version()); -} -#endif - std::string to_wkt( geometry_type const& geom) { -#if BOOST_VERSION >= 104700 std::string wkt; // Use Python String directly ? bool result = mapnik::util::to_wkt(wkt,geom); if (!result) @@ -198,15 +177,10 @@ std::string to_wkt( geometry_type const& geom) throw std::runtime_error("Generate WKT failed"); } return wkt; -#else - throw std::runtime_error("mapnik::to_wkt() requires at least boost 1.47 while your build was compiled against boost " - + boost_version()); -#endif } std::string to_wkt2( path_type const& geom) { -#if BOOST_VERSION >= 104700 std::string wkt; // Use Python String directly ? bool result = mapnik::util::to_wkt(wkt,geom); if (!result) @@ -214,10 +188,6 @@ std::string to_wkt2( path_type const& geom) throw std::runtime_error("Generate WKT failed"); } return wkt; -#else - throw std::runtime_error("mapnik::to_wkt() requires at least boost 1.47 while your build was compiled against boost " - + boost_version()); -#endif } std::string to_geojson( path_type const& geom) @@ -233,8 +203,6 @@ std::string to_geojson( path_type const& geom) std::string to_svg( geometry_type const& geom) { - -#if BOOST_VERSION >= 104700 std::string svg; // Use Python String directly ? bool result = mapnik::util::to_svg(svg,geom); if (!result) @@ -242,17 +210,12 @@ std::string to_svg( geometry_type const& geom) throw std::runtime_error("Generate SVG failed"); } return svg; -#else - throw std::runtime_error("mapnik::to_svg() requires at least boost 1.47 while your build was compiled against boost " - + boost_version()); -#endif } /* // https://github.com/mapnik/mapnik/issues/1437 std::string to_svg2( path_type const& geom) { -#if BOOST_VERSION >= 104700 std::string svg; // Use Python String directly ? bool result = mapnik::util::to_svg(svg,geom); if (!result) @@ -260,10 +223,6 @@ std::string to_svg2( path_type const& geom) throw std::runtime_error("Generate WKT failed"); } return svg; -#else - throw std::runtime_error("mapnik::to_svg() requires at least boost 1.47 while your build was compiled against boost " - + boost_version()); -#endif }*/ @@ -277,12 +236,10 @@ void export_geometry() .value("Polygon",mapnik::geometry_type::types::Polygon) ; -#if BOOST_VERSION >= 104700 enum_("wkbByteOrder") .value("XDR",mapnik::util::wkbXDR) .value("NDR",mapnik::util::wkbNDR) ; -#endif using mapnik::geometry_type; class_, boost::noncopyable>("Geometry2d",no_init) diff --git a/include/mapnik/css_color_grammar.hpp b/include/mapnik/css_color_grammar.hpp index 7e7a3743b..2aa30d253 100644 --- a/include/mapnik/css_color_grammar.hpp +++ b/include/mapnik/css_color_grammar.hpp @@ -40,10 +40,6 @@ // stl #include - -// boost -#include -#if BOOST_VERSION >= 104500 // fusion #include @@ -128,9 +124,13 @@ struct hsl_conv_impl l /= 100.0; if (l <= 0.5) + { m2 = l * (s + 1.0); + } else + { m2 = l + s - l*s; + } m1 = l * 2 - m2; double r = hue_to_rgb(m1, m2, h + 1.0/3.0); @@ -165,357 +165,4 @@ struct css_color_grammar : qi::grammar } -#else // boost 1.42 compatibility - -#include - -namespace mapnik -{ -// temp workaround . TODO: adapt mapnik::color -struct css -{ - css () - : r(255),g(255),b(255),a(255) {} - css(unsigned r_,unsigned g_, unsigned b_,unsigned a_ = 0xff) - : r(r_),g(g_),b(b_),a(a_) {} - - unsigned r; - unsigned g; - unsigned b; - unsigned a; -}; - -} - -BOOST_FUSION_ADAPT_STRUCT( - mapnik::css, - (unsigned, r) - (unsigned, g) - (unsigned, b) - (unsigned, a) - ) - -namespace mapnik -{ - -namespace qi = boost::spirit::qi; -namespace ascii = boost::spirit::ascii; -namespace phoenix = boost::phoenix; - -typedef boost::spirit::ascii::space_type ascii_space_type; - -struct named_colors_ : qi::symbols -{ - named_colors_() - { - add - ("aliceblue", css(240, 248, 255)) - ("antiquewhite", css(250, 235, 215)) - ("aqua", css(0, 255, 255)) - ("aquamarine", css(127, 255, 212)) - ("azure", css(240, 255, 255)) - ("beige", css(245, 245, 220)) - ("bisque", css(255, 228, 196)) - ("black", css(0, 0, 0)) - ("blanchedalmond", css(255,235,205)) - ("blue", css(0, 0, 255)) - ("blueviolet", css(138, 43, 226)) - ("brown", css(165, 42, 42)) - ("burlywood", css(222, 184, 135)) - ("cadetblue", css(95, 158, 160)) - ("chartreuse", css(127, 255, 0)) - ("chocolate", css(210, 105, 30)) - ("coral", css(255, 127, 80)) - ("cornflowerblue", css(100, 149, 237)) - ("cornsilk", css(255, 248, 220)) - ("crimson", css(220, 20, 60)) - ("cyan", css(0, 255, 255)) - ("darkblue", css(0, 0, 139)) - ("darkcyan", css(0, 139, 139)) - ("darkgoldenrod", css(184, 134, 11)) - ("darkgray", css(169, 169, 169)) - ("darkgreen", css(0, 100, 0)) - ("darkgrey", css(169, 169, 169)) - ("darkkhaki", css(189, 183, 107)) - ("darkmagenta", css(139, 0, 139)) - ("darkolivegreen", css(85, 107, 47)) - ("darkorange", css(255, 140, 0)) - ("darkorchid", css(153, 50, 204)) - ("darkred", css(139, 0, 0)) - ("darksalmon", css(233, 150, 122)) - ("darkseagreen", css(143, 188, 143)) - ("darkslateblue", css(72, 61, 139)) - ("darkslategrey", css(47, 79, 79)) - ("darkturquoise", css(0, 206, 209)) - ("darkviolet", css(148, 0, 211)) - ("deeppink", css(255, 20, 147)) - ("deepskyblue", css(0, 191, 255)) - ("dimgray", css(105, 105, 105)) - ("dimgrey", css(105, 105, 105)) - ("dodgerblue", css(30, 144, 255)) - ("firebrick", css(178, 34, 34)) - ("floralwhite", css(255, 250, 240)) - ("forestgreen", css(34, 139, 34)) - ("fuchsia", css(255, 0, 255)) - ("gainsboro", css(220, 220, 220)) - ("ghostwhite", css(248, 248, 255)) - ("gold", css(255, 215, 0)) - ("goldenrod", css(218, 165, 32)) - ("gray", css(128, 128, 128)) - ("grey", css(128, 128, 128)) - ("green", css(0, 128, 0)) - ("greenyellow", css(173, 255, 47)) - ("honeydew", css(240, 255, 240)) - ("hotpink", css(255, 105, 180)) - ("indianred", css(205, 92, 92)) - ("indigo", css(75, 0, 130)) - ("ivory", css(255, 255, 240)) - ("khaki", css(240, 230, 140)) - ("lavender", css(230, 230, 250)) - ("lavenderblush", css(255, 240, 245)) - ("lawngreen", css(124, 252, 0)) - ("lemonchiffon", css(255, 250, 205)) - ("lightblue", css(173, 216, 230)) - ("lightcoral", css(240, 128, 128)) - ("lightcyan", css(224, 255, 255)) - ("lightgoldenrodyellow", css(250, 250, 210)) - ("lightgray", css(211, 211, 211)) - ("lightgreen", css(144, 238, 144)) - ("lightgrey", css(211, 211, 211)) - ("lightpink", css(255, 182, 193)) - ("lightsalmon", css(255, 160, 122)) - ("lightseagreen", css(32, 178, 170)) - ("lightskyblue", css(135, 206, 250)) - ("lightslategray", css(119, 136, 153)) - ("lightslategrey", css(119, 136, 153)) - ("lightsteelblue", css(176, 196, 222)) - ("lightyellow", css(255, 255, 224)) - ("lime", css(0, 255, 0)) - ("limegreen", css(50, 205, 50)) - ("linen", css(250, 240, 230)) - ("magenta", css(255, 0, 255)) - ("maroon", css(128, 0, 0)) - ("mediumaquamarine", css(102, 205, 170)) - ("mediumblue", css(0, 0, 205)) - ("mediumorchid", css(186, 85, 211)) - ("mediumpurple", css(147, 112, 219)) - ("mediumseagreen", css(60, 179, 113)) - ("mediumslateblue", css(123, 104, 238)) - ("mediumspringgreen", css(0, 250, 154)) - ("mediumturquoise", css(72, 209, 204)) - ("mediumvioletred", css(199, 21, 133)) - ("midnightblue", css(25, 25, 112)) - ("mintcream", css(245, 255, 250)) - ("mistyrose", css(255, 228, 225)) - ("moccasin", css(255, 228, 181)) - ("navajowhite", css(255, 222, 173)) - ("navy", css(0, 0, 128)) - ("oldlace", css(253, 245, 230)) - ("olive", css(128, 128, 0)) - ("olivedrab", css(107, 142, 35)) - ("orange", css(255, 165, 0)) - ("orangered", css(255, 69, 0)) - ("orchid", css(218, 112, 214)) - ("palegoldenrod", css(238, 232, 170)) - ("palegreen", css(152, 251, 152)) - ("paleturquoise", css(175, 238, 238)) - ("palevioletred", css(219, 112, 147)) - ("papayawhip", css(255, 239, 213)) - ("peachpuff", css(255, 218, 185)) - ("peru", css(205, 133, 63)) - ("pink", css(255, 192, 203)) - ("plum", css(221, 160, 221)) - ("powderblue", css(176, 224, 230)) - ("purple", css(128, 0, 128)) - ("red", css(255, 0, 0)) - ("rosybrown", css(188, 143, 143)) - ("royalblue", css(65, 105, 225)) - ("saddlebrown", css(139, 69, 19)) - ("salmon", css(250, 128, 114)) - ("sandybrown", css(244, 164, 96)) - ("seagreen", css(46, 139, 87)) - ("seashell", css(255, 245, 238)) - ("sienna", css(160, 82, 45)) - ("silver", css(192, 192, 192)) - ("skyblue", css(135, 206, 235)) - ("slateblue", css(106, 90, 205)) - ("slategray", css(112, 128, 144)) - ("slategrey", css(112, 128, 144)) - ("snow", css(255, 250, 250)) - ("springgreen", css(0, 255, 127)) - ("steelblue", css(70, 130, 180)) - ("tan", css(210, 180, 140)) - ("teal", css(0, 128, 128)) - ("thistle", css(216, 191, 216)) - ("tomato", css(255, 99, 71)) - ("turquoise", css(64, 224, 208)) - ("violet", css(238, 130, 238)) - ("wheat", css(245, 222, 179)) - ("white", css(255, 255, 255)) - ("whitesmoke", css(245, 245, 245)) - ("yellow", css(255, 255, 0)) - ("yellowgreen", css(154, 205, 50)) - ("transparent", css(0, 0, 0, 0)) - ; - } -} ; - -// clipper helper - -template -inline int clip_int(int val) -{ - if (val < MIN ) return MIN; - if (val > MAX ) return MAX; - return val; -} - -struct percent_conv_impl -{ - template - struct result - { - typedef unsigned type; - }; - - unsigned operator() (double val) const - { - return clip_int<0,255>(int((255.0 * val)/100.0 + 0.5)); - } -}; - -struct alpha_conv_impl -{ - template - struct result - { - typedef unsigned type; - }; - - unsigned operator() (double val) const - { - return clip_int<0,255>(int((255.0 * val) + 0.5)); - } -}; - -struct hsl_conv_impl -{ - template - struct result - { - typedef void type; - }; - - template - void operator() (T0 & c, T1 h, T2 s, T3 l) const - { - double m1,m2; - // normalize values - h /= 360.0; - s /= 100.0; - l /= 100.0; - - if (l <= 0.5) - m2 = l * (s + 1.0); - else - m2 = l + s - l*s; - m1 = l * 2 - m2; - - double r = hue_to_rgb(m1, m2, h + 1.0/3.0); - double g = hue_to_rgb(m1, m2, h); - double b = hue_to_rgb(m1, m2, h - 1.0/3.0); - - c.r = clip_int<0,255>(int((255.0 * r) + 0.5)); - c.g = clip_int<0,255>(int((255.0 * g) + 0.5)); - c.b = clip_int<0,255>(int((255.0 * b) + 0.5)); - } -}; - - -template -struct css_color_grammar : qi::grammar -{ - - css_color_grammar() - : css_color_grammar::base_type(css_color) - - { - qi::lit_type lit; - qi::_val_type _val; - qi::double_type double_; - qi::_1_type _1; - qi::_a_type _a; - qi::_b_type _b; - qi::_c_type _c; - using ascii::no_case; - using phoenix::at_c; - - css_color %= rgba_color - | rgba_percent_color - | hsl_percent_color - | hex_color - | hex_color_small - | no_case[named]; - - hex_color %= lit('#') - >> hex2 - >> hex2 - >> hex2 - >> -hex2 - ; - - hex_color_small = lit('#') - >> hex1 [ at_c<0>(_val) = _1 | _1 << 4 ] - >> hex1 [ at_c<1>(_val) = _1 | _1 << 4 ] - >> hex1 [ at_c<2>(_val) = _1 | _1 << 4 ] - >> -hex1[ at_c<3>(_val) = _1 | _1 << 4 ] - ; - - rgba_color = lit("rgb") >> -lit('a') - >> lit('(') - >> dec3 [at_c<0>(_val) = _1] >> ',' - >> dec3 [at_c<1>(_val) = _1] >> ',' - >> dec3 [at_c<2>(_val) = _1] - >> -(','>> -double_ [at_c<3>(_val) = alpha_converter(_1)]) - >> lit(')') - ; - - rgba_percent_color = lit("rgb") >> -lit('a') - >> lit('(') - >> double_ [at_c<0>(_val) = percent_converter(_1)] >> '%' >> ',' - >> double_ [at_c<1>(_val) = percent_converter(_1)] >> '%' >> ',' - >> double_ [at_c<2>(_val) = percent_converter(_1)] >> '%' - >> -(','>> -double_ [at_c<3>(_val) = alpha_converter(_1)]) - >> lit(')') - ; - - hsl_percent_color = lit("hsl") >> -lit('a') - >> lit('(') - >> double_ [ _a = _1] >> ',' // hue 0..360 - >> double_ [ _b = _1] >> '%' >> ',' // saturation 0..100% - >> double_ [ _c = _1] >> '%' // lightness 0..100% - >> -(','>> -double_ [at_c<3>(_val) = alpha_converter(_1)]) // opacity 0...1 - >> lit (')') [ hsl_converter(_val,_a,_b,_c)] - ; - } - - qi::uint_parser< unsigned, 16, 2, 2 > hex2 ; - qi::uint_parser< unsigned, 16, 1, 1 > hex1 ; - qi::uint_parser< unsigned, 10, 1, 3 > dec3 ; - qi::rule rgba_color; - qi::rule rgba_percent_color; - qi::rule,css(), ascii_space_type> hsl_percent_color; - qi::rule hex_color; - qi::rule hex_color_small; - qi::rule css_color; - named_colors_ named; - phoenix::function percent_converter; - phoenix::function alpha_converter; - phoenix::function hsl_converter; -}; - -} - -#endif - #endif // MAPNIK_CSS_COLOR_GRAMMAR_HPP diff --git a/include/mapnik/css_color_grammar_impl.hpp b/include/mapnik/css_color_grammar_impl.hpp index 1adbd1a61..a1cad2a6f 100644 --- a/include/mapnik/css_color_grammar_impl.hpp +++ b/include/mapnik/css_color_grammar_impl.hpp @@ -22,12 +22,6 @@ // NOTE: This is an implementation header file and is only meant to be included // from implementation files. It therefore doesn't have an include guard. - -// boost -#include - -#if BOOST_VERSION >= 104500 - #include namespace mapnik @@ -98,5 +92,3 @@ css_color_grammar::css_color_grammar() } } - -#endif diff --git a/include/mapnik/expression_grammar_impl.hpp b/include/mapnik/expression_grammar_impl.hpp index c77275c63..888be163a 100644 --- a/include/mapnik/expression_grammar_impl.hpp +++ b/include/mapnik/expression_grammar_impl.hpp @@ -30,7 +30,6 @@ #include // boost -#include #include #include #include @@ -76,9 +75,7 @@ expression_grammar::expression_grammar(mapnik::transcoder const& tr) qi::_a_type _a; qi::_b_type _b; qi::_r1_type _r1; -#if BOOST_VERSION > 104200 qi::no_skip_type no_skip; -#endif qi::_val_type _val; qi::lit_type lit; qi::double_type double_; @@ -172,18 +169,11 @@ expression_grammar::expression_grammar(mapnik::transcoder const& tr) ("\\\'", '\'')("\\\"", '\"') ; -#if BOOST_VERSION > 104500 quote_char %= char_('\'') | char_('"'); ustring %= omit[quote_char[_a = _1]] >> *(unesc_char | "\\x" >> hex | (char_ - lit(_a))) >> lit(_a); attr %= '[' >> no_skip[+~char_(']')] >> ']'; -#else - ustring %= lit('\'') - >> *(unesc_char | "\\x" >> hex | (char_ - lit('\''))) - >> lit('\''); - attr %= '[' >> lexeme[+(char_ - ']')] >> ']'; -#endif } diff --git a/include/mapnik/hextree.hpp b/include/mapnik/hextree.hpp index 486d98455..a77545278 100644 --- a/include/mapnik/hextree.hpp +++ b/include/mapnik/hextree.hpp @@ -29,11 +29,7 @@ #include // boost -#include -#if BOOST_VERSION >= 104600 #include -#endif - // stl #include @@ -263,13 +259,8 @@ public: int dist, newdist; // find closest match based on mean of r,g,b,a -#if BOOST_VERSION >= 104600 std::vector::const_iterator pit = boost::lower_bound(sorted_pal_, c, rgba::mean_sort_cmp()); -#else - std::vector::const_iterator pit = - std::lower_bound(sorted_pal_.begin(),sorted_pal_.end(), c, rgba::mean_sort_cmp()); -#endif ind = pit-sorted_pal_.begin(); if (ind == sorted_pal_.size()) ind--; @@ -342,11 +333,7 @@ public: create_palette_rek(sorted_pal_, root_.get()); // sort palette for binary searching in quantization -#if BOOST_VERSION >= 104600 boost::sort(sorted_pal_, rgba::mean_sort_cmp()); -#else - std::sort(sorted_pal_.begin(), sorted_pal_.end(), rgba::mean_sort_cmp()); -#endif // returned palette is rearanged, so that colors with a<255 are at the begining pal_remap_.resize(sorted_pal_.size()); palette.clear(); diff --git a/include/mapnik/json/geojson_generator.hpp b/include/mapnik/json/geojson_generator.hpp index b3049e6ca..2ed0a2aa3 100644 --- a/include/mapnik/json/geojson_generator.hpp +++ b/include/mapnik/json/geojson_generator.hpp @@ -33,8 +33,6 @@ namespace mapnik { namespace json { -#if BOOST_VERSION >= 104700 - template struct feature_generator_grammar; template struct multi_geometry_generator_grammar; @@ -60,27 +58,6 @@ private: const std::unique_ptr > grammar_; }; -#else - -class MAPNIK_DECL feature_generator : private mapnik::noncopyable -{ -public: - feature_generator() {} - ~feature_generator() {} - bool generate(std::string & geojson, mapnik::feature_impl const& f); -}; - -class MAPNIK_DECL geometry_generator : private mapnik::noncopyable -{ -public: - geometry_generator() {} - ~geometry_generator() {} - bool generate(std::string & geojson, mapnik::geometry_container const& g); -}; - -#endif - }} - -#endif //MAPNIK_GEOJSON_GENERATOR_HPP +#endif // MAPNIK_GEOJSON_GENERATOR_HPP diff --git a/include/mapnik/util/dasharray_parser.hpp b/include/mapnik/util/dasharray_parser.hpp index ee4f1301e..5db02c24f 100644 --- a/include/mapnik/util/dasharray_parser.hpp +++ b/include/mapnik/util/dasharray_parser.hpp @@ -38,11 +38,7 @@ bool parse_dasharray(Iterator first, Iterator last, std::vector& dasharr qi::lit_type lit; qi::char_type char_; qi::ascii::space_type space; -#if BOOST_VERSION > 104200 qi::no_skip_type no_skip; -#else - qi::lexeme_type lexeme; -#endif using phoenix::push_back; // SVG // dasharray ::= (length | percentage) (comma-wsp dasharray)? @@ -50,11 +46,7 @@ bool parse_dasharray(Iterator first, Iterator last, std::vector& dasharr // bool r = qi::phrase_parse(first, last, (double_[push_back(phoenix::ref(dasharray), _1)] % -#if BOOST_VERSION > 104200 no_skip[char_(", ")] -#else - lexeme[char_(", ")] -#endif | lit("none")), space); if (first != last) diff --git a/include/mapnik/wkt/wkt_factory.hpp b/include/mapnik/wkt/wkt_factory.hpp index 20436b843..fdabe4dd0 100644 --- a/include/mapnik/wkt/wkt_factory.hpp +++ b/include/mapnik/wkt/wkt_factory.hpp @@ -32,8 +32,6 @@ // boost #include -#include - // stl #include @@ -41,8 +39,6 @@ namespace mapnik { MAPNIK_DECL bool from_wkt(std::string const& wkt, boost::ptr_vector & paths); -#if BOOST_VERSION >= 104700 - class MAPNIK_DECL wkt_parser : mapnik::noncopyable { typedef std::string::const_iterator iterator_type; @@ -53,8 +49,6 @@ private: const std::unique_ptr > grammar_; }; -#endif - } diff --git a/plugins/input/csv/build.py b/plugins/input/csv/build.py index b7ebcf81a..802ae9d1d 100644 --- a/plugins/input/csv/build.py +++ b/plugins/input/csv/build.py @@ -21,51 +21,42 @@ Import ('env') -can_build = True -if env.get('BOOST_LIB_VERSION_FROM_HEADER'): - boost_version_from_header = int(env['BOOST_LIB_VERSION_FROM_HEADER'].split('_')[1]) - if boost_version_from_header < 47: - can_build = False +Import ('plugin_base') -if not can_build: - print 'WARNING: skipping building the optional geojson datasource plugin which requires boost >= 1.47' -else: - Import ('plugin_base') +PLUGIN_NAME = 'csv' - PLUGIN_NAME = 'csv' +plugin_env = plugin_base.Clone() - plugin_env = plugin_base.Clone() +plugin_sources = Split( + """ + %(PLUGIN_NAME)s_datasource.cpp + """ % locals() +) - plugin_sources = Split( - """ - %(PLUGIN_NAME)s_datasource.cpp - """ % locals() - ) +# Link Library to Dependencies +libraries = [] +libraries.append('boost_system%s' % env['BOOST_APPEND']) +libraries.append(env['ICU_LIB_NAME']) - # Link Library to Dependencies - libraries = [] - libraries.append('boost_system%s' % env['BOOST_APPEND']) - libraries.append(env['ICU_LIB_NAME']) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') - if env['PLUGIN_LINKING'] == 'shared': - libraries.append('mapnik') + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries) - TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, - SHLIBPREFIX='', - SHLIBSUFFIX='.input', - source=plugin_sources, - LIBS=libraries) + # if the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) - # if the plugin links to libmapnik ensure it is built first - Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) - if 'uninstall' not in COMMAND_LINE_TARGETS: - env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) - env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} - plugin_obj = { - 'LIBS': libraries, - 'SOURCES': plugin_sources, - } - - Return('plugin_obj') +Return('plugin_obj') diff --git a/plugins/input/geojson/build.py b/plugins/input/geojson/build.py index 18af1ecd6..0a70c55a8 100644 --- a/plugins/input/geojson/build.py +++ b/plugins/input/geojson/build.py @@ -21,54 +21,45 @@ Import ('env') -can_build = True -if env.get('BOOST_LIB_VERSION_FROM_HEADER'): - boost_version_from_header = int(env['BOOST_LIB_VERSION_FROM_HEADER'].split('_')[1]) - if boost_version_from_header < 47: - can_build = False +Import ('plugin_base') -if not can_build: - print 'WARNING: skipping building the optional geojson datasource plugin which requires boost >= 1.47' -else: - Import ('plugin_base') +PLUGIN_NAME = 'geojson' - PLUGIN_NAME = 'geojson' +plugin_env = plugin_base.Clone() - plugin_env = plugin_base.Clone() +plugin_sources = Split( + """ + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp + """ % locals() +) - plugin_sources = Split( - """ - %(PLUGIN_NAME)s_datasource.cpp - %(PLUGIN_NAME)s_featureset.cpp - """ % locals() - ) +# Link Library to Dependencies +libraries = [] +libraries.append(env['ICU_LIB_NAME']) +libraries.append('boost_system%s' % env['BOOST_APPEND']) +#if env['THREADING'] == 'multi': +# libraries.append('boost_thread%s' % env['BOOST_APPEND']) - # Link Library to Dependencies - libraries = [] - libraries.append(env['ICU_LIB_NAME']) - libraries.append('boost_system%s' % env['BOOST_APPEND']) - #if env['THREADING'] == 'multi': - # libraries.append('boost_thread%s' % env['BOOST_APPEND']) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') - if env['PLUGIN_LINKING'] == 'shared': - libraries.append('mapnik') + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries) - TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, - SHLIBPREFIX='', - SHLIBSUFFIX='.input', - source=plugin_sources, - LIBS=libraries) + # if the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) - # if the plugin links to libmapnik ensure it is built first - Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) - if 'uninstall' not in COMMAND_LINE_TARGETS: - env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) - env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} - plugin_obj = { - 'LIBS': libraries, - 'SOURCES': plugin_sources, - } - - Return('plugin_obj') +Return('plugin_obj') diff --git a/plugins/input/topojson/build.py b/plugins/input/topojson/build.py index 90fbbf25b..2a349d92f 100644 --- a/plugins/input/topojson/build.py +++ b/plugins/input/topojson/build.py @@ -21,55 +21,46 @@ Import ('env') -can_build = True -if env.get('BOOST_LIB_VERSION_FROM_HEADER'): - boost_version_from_header = int(env['BOOST_LIB_VERSION_FROM_HEADER'].split('_')[1]) - if boost_version_from_header < 47: - can_build = False +Import ('plugin_base') -if not can_build: - print 'WARNING: skipping building the optional geojson datasource plugin which requires boost >= 1.47' -else: - Import ('plugin_base') +PLUGIN_NAME = 'topojson' - PLUGIN_NAME = 'topojson' +plugin_env = plugin_base.Clone() - plugin_env = plugin_base.Clone() +plugin_sources = Split( + """ + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp + %(PLUGIN_NAME)s_grammar.cpp + """ % locals() +) - plugin_sources = Split( - """ - %(PLUGIN_NAME)s_datasource.cpp - %(PLUGIN_NAME)s_featureset.cpp - %(PLUGIN_NAME)s_grammar.cpp - """ % locals() - ) +# Link Library to Dependencies +libraries = [] +libraries.append(env['ICU_LIB_NAME']) +libraries.append('boost_system%s' % env['BOOST_APPEND']) +#if env['THREADING'] == 'multi': +# libraries.append('boost_thread%s' % env['BOOST_APPEND']) - # Link Library to Dependencies - libraries = [] - libraries.append(env['ICU_LIB_NAME']) - libraries.append('boost_system%s' % env['BOOST_APPEND']) - #if env['THREADING'] == 'multi': - # libraries.append('boost_thread%s' % env['BOOST_APPEND']) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') - if env['PLUGIN_LINKING'] == 'shared': - libraries.append('mapnik') + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries) - TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, - SHLIBPREFIX='', - SHLIBSUFFIX='.input', - source=plugin_sources, - LIBS=libraries) + # if the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) - # if the plugin links to libmapnik ensure it is built first - Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) - if 'uninstall' not in COMMAND_LINE_TARGETS: - env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) - env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} - plugin_obj = { - 'LIBS': libraries, - 'SOURCES': plugin_sources, - } - - Return('plugin_obj') +Return('plugin_obj') diff --git a/src/color_factory.cpp b/src/color_factory.cpp index 3199ed971..3db62b50e 100644 --- a/src/color_factory.cpp +++ b/src/color_factory.cpp @@ -26,9 +26,6 @@ #include #include -// boost -#include - namespace mapnik { color parse_color(std::string const& str) @@ -44,23 +41,9 @@ color parse_color(std::string const& str, std::string::const_iterator first = str.begin(); std::string::const_iterator last = str.end(); boost::spirit::ascii::space_type space; - // boost 1.41 -> 1.44 compatibility, to be removed in mapnik 2.1 (dane) -#if BOOST_VERSION >= 104500 bool result = boost::spirit::qi::phrase_parse(first, last, g, space, c); -#else - mapnik::css css_; - bool result = boost::spirit::qi::phrase_parse(first, last, g, - space, - css_); - c.set_red(css_.r); - c.set_green(css_.g); - c.set_blue(css_.b); - c.set_alpha(css_.a); - -#endif - if (result && (first == last)) { return c; diff --git a/src/conversions.cpp b/src/conversions.cpp index 5e7353cc0..2b5a496b4 100644 --- a/src/conversions.cpp +++ b/src/conversions.cpp @@ -39,17 +39,11 @@ boost::spirit::domain_::domain, name##_expr_type); \ BOOST_AUTO(name, boost::proto::deep_copy(expr)); \ -// karma is used by default unless -// the boost version is too old +// karma is used by default #define MAPNIK_KARMA_TO_STRING #ifdef MAPNIK_KARMA_TO_STRING - #include - #if BOOST_VERSION < 104500 - #undef MAPNIK_KARMA_TO_STRING - #else - #include - #endif + #include #endif namespace mapnik { diff --git a/src/css_color_grammar.cpp b/src/css_color_grammar.cpp index df36b5d44..55234c0e3 100644 --- a/src/css_color_grammar.cpp +++ b/src/css_color_grammar.cpp @@ -20,11 +20,6 @@ * *****************************************************************************/ -// boost -#include - -#if BOOST_VERSION >= 104500 - #include namespace mapnik @@ -186,5 +181,3 @@ named_colors_::named_colors_() template struct mapnik::css_color_grammar; } - -#endif diff --git a/src/image_filter_grammar.cpp b/src/image_filter_grammar.cpp index 9362c6ae8..9775cded4 100644 --- a/src/image_filter_grammar.cpp +++ b/src/image_filter_grammar.cpp @@ -23,9 +23,6 @@ // mapnik #include -// boost -#include - // spirit #include @@ -53,17 +50,12 @@ image_filter_grammar::image_filter_grammar() qi::eps_type eps; qi::char_type char_; qi::double_type double_; + qi::no_skip_type no_skip; using phoenix::push_back; using phoenix::construct; using phoenix::at_c; -#if BOOST_VERSION >= 104700 - qi::no_skip_type no_skip; start = -(filter % no_skip[*char_(", ")]) ; -#else - start = -(filter) - ; -#endif filter = lit("emboss") >> no_args [push_back(_val,construct())] diff --git a/src/json/feature_collection_parser.cpp b/src/json/feature_collection_parser.cpp index 9ea228070..c89e6b6bc 100644 --- a/src/json/feature_collection_parser.cpp +++ b/src/json/feature_collection_parser.cpp @@ -20,20 +20,11 @@ * *****************************************************************************/ -// TODO https://github.com/mapnik/mapnik/issues/1658 -#include -#if BOOST_VERSION >= 105200 -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#define BOOST_SPIRIT_USE_PHOENIX_V3 -#endif -#endif - // mapnik #include #include // boost -#include #include #include @@ -42,8 +33,6 @@ namespace mapnik { namespace json { -#if BOOST_VERSION >= 104700 - template feature_collection_parser::feature_collection_parser(generic_json & json, mapnik::context_ptr const& ctx, @@ -52,21 +41,13 @@ namespace mapnik { namespace json { template feature_collection_parser::~feature_collection_parser() {} -#endif template bool feature_collection_parser::parse(iterator_type first, iterator_type last, std::vector & features) { -#if BOOST_VERSION >= 104700 using namespace boost::spirit; standard_wide::space_type space; return qi::phrase_parse(first, last, *grammar_, space, features); -#else - std::ostringstream s; - s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100; - throw std::runtime_error("mapnik::feature_collection_parser::parse() requires at least boost 1.47 while your build was compiled against boost " + s.str()); - return false; -#endif } template class feature_collection_parser ; diff --git a/src/json/feature_grammar.cpp b/src/json/feature_grammar.cpp index ae1eac7ad..5dbe2f1e0 100644 --- a/src/json/feature_grammar.cpp +++ b/src/json/feature_grammar.cpp @@ -20,9 +20,6 @@ * *****************************************************************************/ -#include -#if BOOST_VERSION >= 104700 - // mapnik #include #include @@ -41,11 +38,7 @@ feature_grammar::feature_grammar(generic_json & qi::lit_type lit; qi::long_long_type long_long; qi::double_type double_; -#if BOOST_VERSION > 104200 qi::no_skip_type no_skip; -#else - qi::lexeme_type lexeme; -#endif standard_wide::char_type char_; qi::_val_type _val; qi::_1_type _1; @@ -81,12 +74,7 @@ feature_grammar::feature_grammar(generic_json & >> json_.value >> *(lit(',') >> json_.value) >> lit(']') ; -// https://github.com/mapnik/mapnik/issues/1342 -#if BOOST_VERSION >= 104700 json_.number %= json_.strict_double -#else - json_.number = json_.strict_double -#endif | json_.int__ | lit("true") [_val = true] | lit ("false") [_val = false] @@ -103,15 +91,11 @@ feature_grammar::feature_grammar(generic_json & ("\\r", '\r') // carrige return ("\\t", '\t') // tab ; -#if BOOST_VERSION > 104200 + json_.string_ %= lit('"') >> no_skip[*(json_.unesc_char | "\\u" >> json_.hex4 | (char_ - lit('"')))] >> lit('"') ; -#else - json_.string_ %= lit('"') >> lexeme[*(json_.unesc_char | "\\u" >> json_.hex4 | (char_ - lit('"')))] >> lit('"') - ; -#endif - // geojson types + // geojson types feature_type = lit("\"type\"") >> lit(':') >> lit("\"Feature\"") @@ -154,5 +138,3 @@ template struct mapnik::json::feature_grammar >,mapnik::feature_impl>; }} - -#endif diff --git a/src/json/feature_parser.cpp b/src/json/feature_parser.cpp index ad123bcb7..310b23299 100644 --- a/src/json/feature_parser.cpp +++ b/src/json/feature_parser.cpp @@ -20,8 +20,6 @@ * *****************************************************************************/ -#include - // mapnik #include #include @@ -32,29 +30,19 @@ namespace mapnik { namespace json { -#if BOOST_VERSION >= 104700 - template feature_parser::feature_parser(generic_json & json, mapnik::transcoder const& tr) : grammar_(new feature_grammar(json, tr)) {} template feature_parser::~feature_parser() {} -#endif template bool feature_parser::parse(iterator_type first, iterator_type last, mapnik::feature_impl & f) { -#if BOOST_VERSION >= 104700 using namespace boost::spirit; standard_wide::space_type space; return qi::phrase_parse(first, last, (*grammar_)(boost::phoenix::ref(f)), space); -#else - std::ostringstream s; - s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100; - throw std::runtime_error("mapnik::feature_parser::parse() requires at least boost 1.47 while your build was compiled against boost " + s.str()); - return false; -#endif } template class feature_parser; diff --git a/src/json/geojson_generator.cpp b/src/json/geojson_generator.cpp index 6e98a4d6f..d1bd97dce 100644 --- a/src/json/geojson_generator.cpp +++ b/src/json/geojson_generator.cpp @@ -21,14 +21,11 @@ *****************************************************************************/ // boost -#include #include #include - -#if BOOST_VERSION >= 104700 - #include #include + #include namespace mapnik { namespace json { @@ -56,31 +53,3 @@ bool geometry_generator::generate(std::string & geojson, mapnik::geometry_contai } }} - -#else - -#include -#include -#include - -namespace mapnik { namespace json { - -bool feature_generator::generate(std::string & geojson, mapnik::feature_impl const& f) -{ - std::ostringstream s; - s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100; - throw std::runtime_error("feature_generator::generate() requires at least boost 1.47 while your build was compiled against boost " + s.str()); - return false; -} - -bool geometry_generator::generate(std::string & geojson, mapnik::geometry_container const& g) -{ - std::ostringstream s; - s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100; - throw std::runtime_error("geometry_generator::generate() requires at least boost 1.47 while your build was compiled against boost " + s.str()); - return false; -} - -}} - -#endif diff --git a/src/json/geometry_grammar.cpp b/src/json/geometry_grammar.cpp index fcd400aef..614858bee 100644 --- a/src/json/geometry_grammar.cpp +++ b/src/json/geometry_grammar.cpp @@ -20,9 +20,6 @@ * *****************************************************************************/ -#include -#if BOOST_VERSION >= 104700 - // mapnik #include @@ -165,5 +162,3 @@ template struct mapnik::json::geometry_grammar; template struct mapnik::json::geometry_grammar > >; }} - -#endif diff --git a/src/json/geometry_parser.cpp b/src/json/geometry_parser.cpp index 507a15782..77fe45ab3 100644 --- a/src/json/geometry_parser.cpp +++ b/src/json/geometry_parser.cpp @@ -25,7 +25,6 @@ #include // boost -#include #include #include #include @@ -35,45 +34,28 @@ namespace mapnik { namespace json { -#if BOOST_VERSION >= 104700 - template geometry_parser::geometry_parser() : grammar_(new geometry_grammar()) {} template geometry_parser::~geometry_parser() {} -#endif template bool geometry_parser::parse(iterator_type first, iterator_type last, boost::ptr_vector& path) { -#if BOOST_VERSION >= 104700 using namespace boost::spirit; standard_wide::space_type space; return qi::phrase_parse(first, last, (*grammar_)(boost::phoenix::ref(path)), space); -#else - std::ostringstream s; - s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100; - throw std::runtime_error("mapnik::geometry_parser::parse() requires at least boost 1.47 while your build was compiled against boost " + s.str()); - return false; -#endif } bool from_geojson(std::string const& json, boost::ptr_vector & paths) { -#if BOOST_VERSION >= 104700 geometry_parser parser; std::string::const_iterator start = json.begin(); std::string::const_iterator end = json.end(); return parser.parse(start, end ,paths); -#else - std::ostringstream s; - s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100; - throw std::runtime_error("mapnik::json::from_geojson() requires at least boost 1.47 while your build was compiled against boost " + s.str()); - return false; -#endif } template class geometry_parser ; diff --git a/src/transform_expression_grammar.cpp b/src/transform_expression_grammar.cpp index 42ad47a5d..3f4576077 100644 --- a/src/transform_expression_grammar.cpp +++ b/src/transform_expression_grammar.cpp @@ -24,7 +24,6 @@ #include // boost -#include #include #include #include @@ -58,13 +57,8 @@ transform_expression_grammar::transform_expression_grammar(expression_ // the order provided. The individual transform definitions are // separated by whitespace and/or a comma. -#if BOOST_VERSION > 104200 qi::no_skip_type no_skip; start = transform_ % no_skip[char_(", ")] ; -#else - qi::lexeme_type lexeme; - start = transform_ % lexeme[char_(", ")] ; -#endif transform_ = matrix | translate | scale | rotate | skewX | skewY ; diff --git a/src/wkt/wkt_factory.cpp b/src/wkt/wkt_factory.cpp index 1b139ee20..89856ac2f 100644 --- a/src/wkt/wkt_factory.cpp +++ b/src/wkt/wkt_factory.cpp @@ -20,9 +20,6 @@ * *****************************************************************************/ -// boost -#include - // mapnik #include #include @@ -32,11 +29,9 @@ #include #include - namespace mapnik { -#if BOOST_VERSION >= 104700 wkt_parser::wkt_parser() : grammar_(new mapnik::wkt::wkt_collection_grammar) {} @@ -49,19 +44,11 @@ bool wkt_parser::parse(std::string const& wkt, boost::ptr_vector iterator_type last = wkt.end(); return qi::phrase_parse(first, last, *grammar_, space, paths); } -#endif bool from_wkt(std::string const& wkt, boost::ptr_vector & paths) { -#if BOOST_VERSION >= 104700 wkt_parser parser; return parser.parse(wkt,paths); -#else - std::ostringstream s; - s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100; - throw std::runtime_error("mapnik::from_wkt() requires at least boost 1.47 while your build was compiled against boost " + s.str()); - return false; -#endif } } diff --git a/src/wkt/wkt_generator.cpp b/src/wkt/wkt_generator.cpp index 5443c7fc8..995934b42 100644 --- a/src/wkt/wkt_generator.cpp +++ b/src/wkt/wkt_generator.cpp @@ -20,10 +20,6 @@ * *****************************************************************************/ -#include - -#if BOOST_VERSION >= 104700 - #include #include #include @@ -171,5 +167,3 @@ bool to_wkt(std::string & wkt, mapnik::geometry_container const& geom) } }} - -#endif diff --git a/tests/cpp_tests/agg_blend_src_over_test.cpp b/tests/cpp_tests/agg_blend_src_over_test.cpp index 7fbcb18a6..763324d81 100644 --- a/tests/cpp_tests/agg_blend_src_over_test.cpp +++ b/tests/cpp_tests/agg_blend_src_over_test.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -205,9 +204,7 @@ int main(int argc, char** argv) if (!::boost::detail::test_errors()) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ AGG blending: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { std::clog << "C++ AGG blending: "; return ::boost::report_errors(); diff --git a/tests/cpp_tests/clipping_test.cpp b/tests/cpp_tests/clipping_test.cpp index 654dce5e3..102eb20be 100644 --- a/tests/cpp_tests/clipping_test.cpp +++ b/tests/cpp_tests/clipping_test.cpp @@ -7,7 +7,6 @@ // boost #include #include -#include // stl #include @@ -126,9 +125,7 @@ int main(int argc, char** argv) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ clipping: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { diff --git a/tests/cpp_tests/conversions_test.cpp b/tests/cpp_tests/conversions_test.cpp index 687f2ba4a..afec284d1 100644 --- a/tests/cpp_tests/conversions_test.cpp +++ b/tests/cpp_tests/conversions_test.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -286,9 +285,7 @@ int main(int argc, char** argv) if (!::boost::detail::test_errors()) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ type conversions: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { return ::boost::report_errors(); } diff --git a/tests/cpp_tests/exceptions_test.cpp b/tests/cpp_tests/exceptions_test.cpp index bdfebfccf..547b2eee3 100644 --- a/tests/cpp_tests/exceptions_test.cpp +++ b/tests/cpp_tests/exceptions_test.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -93,9 +92,7 @@ int main(int argc, char** argv) if (!::boost::detail::test_errors()) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ exceptions: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { return ::boost::report_errors(); } diff --git a/tests/cpp_tests/font_registration_test.cpp b/tests/cpp_tests/font_registration_test.cpp index 93a9d5854..fdaae2f3c 100644 --- a/tests/cpp_tests/font_registration_test.cpp +++ b/tests/cpp_tests/font_registration_test.cpp @@ -2,7 +2,6 @@ #include #include -#include #include #include @@ -97,9 +96,7 @@ int main(int argc, char** argv) if (!::boost::detail::test_errors()) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ fonts registration: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { return ::boost::report_errors(); } diff --git a/tests/cpp_tests/fontset_runtime_test.cpp b/tests/cpp_tests/fontset_runtime_test.cpp index 2f6aa4125..4b10d80b9 100644 --- a/tests/cpp_tests/fontset_runtime_test.cpp +++ b/tests/cpp_tests/fontset_runtime_test.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -75,9 +74,7 @@ int main(int argc, char** argv) if (!::boost::detail::test_errors()) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ fontset runtime: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { return ::boost::report_errors(); } diff --git a/tests/cpp_tests/geometry_converters_test.cpp b/tests/cpp_tests/geometry_converters_test.cpp index 26986259b..cfb6bbe4f 100644 --- a/tests/cpp_tests/geometry_converters_test.cpp +++ b/tests/cpp_tests/geometry_converters_test.cpp @@ -1,11 +1,9 @@ -#include #include #include #include #include #include "utils.hpp" -#if BOOST_VERSION >= 104700 #include #include #include @@ -124,7 +122,6 @@ boost::optional polygon_bbox_clipping(mapnik::box2d bbox, return boost::optional(); } -#endif int main(int argc, char** argv) { @@ -137,8 +134,6 @@ int main(int argc, char** argv) BOOST_TEST(set_working_dir(args)); -#if BOOST_VERSION >= 104700 - // LineString/bbox clipping { std::string wkt_in("LineString(0 0,200 200)"); @@ -175,17 +170,13 @@ int main(int argc, char** argv) BOOST_TEST(result); BOOST_TEST_EQ(*result,std::string("Polygon((50 50,50 100,75 150,125 150,150 100,150 50,50 50))")); } -#endif - #endif if (!::boost::detail::test_errors()) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ geometry conversions: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { diff --git a/tests/cpp_tests/image_io_test.cpp b/tests/cpp_tests/image_io_test.cpp index cc55cb99d..bdc4f8967 100644 --- a/tests/cpp_tests/image_io_test.cpp +++ b/tests/cpp_tests/image_io_test.cpp @@ -1,5 +1,3 @@ -#include - #include #include #include @@ -112,9 +110,7 @@ int main(int argc, char** argv) if (!::boost::detail::test_errors()) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ image i/o: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { return ::boost::report_errors(); } diff --git a/tests/cpp_tests/label_algo_test.cpp b/tests/cpp_tests/label_algo_test.cpp index eedecfb32..78cc7f682 100644 --- a/tests/cpp_tests/label_algo_test.cpp +++ b/tests/cpp_tests/label_algo_test.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -58,9 +57,7 @@ int main(int argc, char** argv) if (!::boost::detail::test_errors()) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ label algorithms: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { return ::boost::report_errors(); } diff --git a/tests/cpp_tests/map_request_test.cpp b/tests/cpp_tests/map_request_test.cpp index e7e2725cc..0fbe70f40 100644 --- a/tests/cpp_tests/map_request_test.cpp +++ b/tests/cpp_tests/map_request_test.cpp @@ -1,4 +1,3 @@ -#include #include #include @@ -160,9 +159,7 @@ int main(int argc, char** argv) if (!::boost::detail::test_errors()) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ Map Request rendering hook: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { return ::boost::report_errors(); } diff --git a/tests/cpp_tests/params_test.cpp b/tests/cpp_tests/params_test.cpp index 75a54660e..f78a20858 100644 --- a/tests/cpp_tests/params_test.cpp +++ b/tests/cpp_tests/params_test.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -82,9 +81,7 @@ int main(int argc, char** argv) if (!::boost::detail::test_errors()) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ parameters: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { return ::boost::report_errors(); } diff --git a/tests/cpp_tests/wkb_formats_test.cpp b/tests/cpp_tests/wkb_formats_test.cpp index 231388c69..c88c17766 100644 --- a/tests/cpp_tests/wkb_formats_test.cpp +++ b/tests/cpp_tests/wkb_formats_test.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -118,9 +117,7 @@ int main(int argc, char** argv) if (!::boost::detail::test_errors()) { if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; else std::clog << "C++ CSV parse: \x1b[1;32m✓ \x1b[0m\n"; -#if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; -#endif } else { return ::boost::report_errors(); }