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

fix: add support for Boost >= 1.76 #27

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
4 changes: 4 additions & 0 deletions autoware_utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ project(autoware_utils)
find_package(autoware_cmake REQUIRED)
autoware_package()

find_package(Boost REQUIRED)

file(GLOB_RECURSE src_files
src/*.cpp
src/geometry/*.cpp
Expand All @@ -15,6 +17,8 @@ file(GLOB_RECURSE src_files
ament_auto_add_library(autoware_utils SHARED
${src_files}
)
target_compile_definitions(autoware_utils
PRIVATE BOOST_MAJOR_VERSION=${Boost_MAJOR_VERSION} BOOST_MINOR_VERSION=${Boost_MINOR_VERSION})

if(BUILD_TESTING)
file(GLOB_RECURSE test_files test/**/*.cpp)
Expand Down
5 changes: 5 additions & 0 deletions autoware_utils/src/geometry/random_concave_polygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@
#include <boost/geometry/algorithms/correct.hpp>
#include <boost/geometry/algorithms/intersects.hpp>
#include <boost/geometry/algorithms/is_valid.hpp>

#if BOOST_MAJOR_VERSION == 1 && BOOST_MINOR_VERSION < 76
#include <boost/geometry/strategies/agnostic/hull_graham_andrew.hpp>
#else
#error TODO: add support for Boost 1.76 or later (Ubuntu 24.04, ROS Jazzy)
#endif

#include <algorithm>
#include <limits>
Expand Down
Loading