Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with c++11 flag #13

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.1)
project(spatialalgorithms LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED on)

option(BUILD_EXAMPLES "Build examples ON/OFF(default)" OFF)
Expand Down
4 changes: 2 additions & 2 deletions cmake/spatialalgorithms.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ execute_process(
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")

# CMake 3.1 does not have this yet.
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14")
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
2 changes: 2 additions & 0 deletions include/mapbox/geometry/algorithms/closest_point.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include <mapbox/geometry/point.hpp>

namespace mapbox { namespace geometry { namespace algorithms {

template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion include/mapbox/geometry/algorithms/closest_point_impl.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/algorithms/detail/boost_adapters.hpp>
#include <mapbox/geometry/algorithms/closest_point.hpp>
#include <boost/geometry/extensions/algorithms/closest_point.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

// mapbox
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/box.hpp>
// boost.geometry
#include <boost/geometry/geometry.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#pragma once

#include <type_traits>
#include <mapbox/geometry/geometry.hpp>

namespace mapbox { namespace geometry { namespace algorithms { namespace detail {

template <typename T>
Expand Down
2 changes: 2 additions & 0 deletions include/mapbox/geometry/algorithms/intersection.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/box.hpp>
#include <vector>

namespace mapbox { namespace geometry { namespace algorithms {
Expand Down
2 changes: 1 addition & 1 deletion include/mapbox/geometry/algorithms/intersection_impl.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/box.hpp>
#include <mapbox/geometry/algorithms/detail/boost_adapters.hpp>
#include <mapbox/geometry/algorithms/intersection.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/algorithms/detail/boost_adapters.hpp>
#include <mapbox/geometry/algorithms/detail/predicate_dispatcher.hpp>
#include <mapbox/geometry/algorithms/predicates/disjoint.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/algorithms/detail/boost_adapters.hpp>
#include <mapbox/geometry/algorithms/detail/predicate_dispatcher.hpp>
#include <mapbox/geometry/algorithms/predicates/intersects.hpp>
Expand Down
2 changes: 1 addition & 1 deletion include/mapbox/geometry/algorithms/scaling_impl.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/algorithms/detail/boost_adapters.hpp>
#include <mapbox/geometry/algorithms/scaling.hpp>
#include <boost/geometry/algorithms/transform.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/test-spatial-algorithms.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/algorithms/predicates.hpp>
#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion test/unit/closest_point/test-closest-point.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <boost/test/unit_test.hpp>
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/algorithms/closest_point.hpp>
#include <iostream>
BOOST_AUTO_TEST_SUITE(closest_point_tests)
Expand Down
3 changes: 2 additions & 1 deletion test/unit/intersection/test-intersection.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <boost/test/unit_test.hpp>
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/box.hpp>
#include <mapbox/geometry/algorithms/intersection.hpp>
#include <iostream>
BOOST_AUTO_TEST_SUITE(intersection_tests)
Expand Down
2 changes: 1 addition & 1 deletion test/unit/predicates/test-disjoint.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <boost/test/unit_test.hpp>
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/algorithms/predicates.hpp>
#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion test/unit/predicates/test-intersects.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <boost/test/unit_test.hpp>
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/algorithms/predicates.hpp>
#include <iostream>

Expand Down
3 changes: 2 additions & 1 deletion test/unit/scaling/test-scaling.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include <boost/test/unit_test.hpp>
#include <mapbox/geometry.hpp>
#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/algorithms/scaling.hpp>
#include <iostream>
#include <cmath>

BOOST_AUTO_TEST_SUITE(scaling_tests)

Expand Down