only build cpp test if >= boost 1.47

This commit is contained in:
Dane Springmeyer 2013-06-02 14:54:27 -07:00
parent 949a356b29
commit c5f01be4e2

View file

@ -1,5 +1,11 @@
#include <boost/version.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <iostream>
#include <vector>
#include <algorithm>
#include "utils.hpp"
#if BOOST_VERSION >= 104700
#include <mapnik/layer.hpp>
#include <mapnik/feature_type_style.hpp>
#include <mapnik/debug.hpp>
@ -8,19 +14,9 @@
#include <mapnik/geometry.hpp>
#include <mapnik/wkt/wkt_factory.hpp>
#include <mapnik/well_known_srs.hpp>
#if BOOST_VERSION >= 104700
#include <mapnik/util/geometry_to_wkb.hpp>
#include <mapnik/util/geometry_to_wkt.hpp>
#include <mapnik/util/geometry_to_svg.hpp>
#endif
#include <boost/detail/lightweight_test.hpp>
#include <iostream>
#include <vector>
#include <algorithm>
#include "utils.hpp"
struct output_geometry_backend
{
@ -125,6 +121,7 @@ boost::optional<std::string> polygon_bbox_clipping(mapnik::box2d<double> bbox,
return boost::optional<std::string>();
}
#endif
int main(int argc, char** argv)
{
@ -137,6 +134,8 @@ 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)");
@ -174,6 +173,9 @@ int main(int argc, char** argv)
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";