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

feat(planning): use autoware_cmake to avoid Boost warning #534

Merged
merged 1 commit into from
May 26, 2023
Merged
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
14 changes: 2 additions & 12 deletions planning/behavior_path_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(behavior_path_planner)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif()
find_package(autoware_cmake REQUIRED)
autoware_package()

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
find_package(OpenCV REQUIRED)

ament_auto_add_library(behavior_path_planner_node SHARED
Expand Down Expand Up @@ -46,8 +38,6 @@ rclcpp_components_register_node(behavior_path_planner_node
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
ament_add_ros_isolated_gmock(test_${PROJECT_NAME}_utilities
test/input.cpp
test/test_utilities.cpp
Expand Down
1 change: 1 addition & 0 deletions planning/behavior_path_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
<build_depend>autoware_cmake</build_depend>

<depend>autoware_auto_perception_msgs</depend>
<depend>autoware_auto_planning_msgs</depend>
Expand Down
17 changes: 2 additions & 15 deletions planning/behavior_velocity_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
cmake_minimum_required(VERSION 3.5)
project(behavior_velocity_planner)

### Compile options
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif()
find_package(autoware_cmake REQUIRED)
autoware_package()

# Find the non-obvious packages manually
find_package(ament_cmake REQUIRED)
find_package(Boost REQUIRED)
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(PCL REQUIRED COMPONENTS common)
find_package(OpenCV REQUIRED)

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

set(BEHAVIOR_VELOCITY_PLANNER_DEPENDENCIES
tier4_api_msgs
autoware_auto_perception_msgs
Expand Down Expand Up @@ -312,8 +301,6 @@ rclcpp_components_register_node(behavior_velocity_planner


if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()

# utils for test
ament_auto_add_library(utilization SHARED
Expand Down
1 change: 1 addition & 0 deletions planning/behavior_velocity_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>eigen3_cmake_module</buildtool_depend>
<build_depend>autoware_cmake</build_depend>

<depend>autoware_auto_mapping_msgs</depend>
<depend>autoware_auto_perception_msgs</depend>
Expand Down
19 changes: 2 additions & 17 deletions planning/mission_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(mission_planner)

### Compile options
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
find_package(autoware_cmake REQUIRED)
autoware_package()

ament_auto_add_library(mission_planner_node SHARED
lib/mission_planner_base.cpp
Expand All @@ -34,11 +24,6 @@ rclcpp_components_register_node(goal_pose_visualizer_node
EXECUTABLE goal_pose_visualizer
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package(INSTALL_TO_SHARE
launch
)
1 change: 1 addition & 0 deletions planning/mission_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
<build_depend>autoware_cmake</build_depend>

<depend>autoware_auto_planning_msgs</depend>
<depend>geometry_msgs</depend>
Expand Down
18 changes: 2 additions & 16 deletions planning/obstacle_avoidance_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(obstacle_avoidance_planner)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif()

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
find_package(autoware_cmake REQUIRED)
autoware_package()

find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)
Expand Down Expand Up @@ -42,11 +33,6 @@ rclcpp_components_register_node(obstacle_avoidance_planner
EXECUTABLE obstacle_avoidance_planner_node
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package(
INSTALL_TO_SHARE
launch
Expand Down
1 change: 1 addition & 0 deletions planning/obstacle_avoidance_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
<build_depend>autoware_cmake</build_depend>

<depend>autoware_auto_perception_msgs</depend>
<depend>autoware_auto_planning_msgs</depend>
Expand Down
18 changes: 2 additions & 16 deletions planning/obstacle_stop_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(obstacle_stop_planner)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif()

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
find_package(autoware_cmake REQUIRED)
autoware_package()

find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)
Expand Down Expand Up @@ -39,11 +30,6 @@ rclcpp_components_register_node(obstacle_stop_planner
EXECUTABLE obstacle_stop_planner_node
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package(
INSTALL_TO_SHARE
config
Expand Down
1 change: 1 addition & 0 deletions planning/obstacle_stop_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
<build_depend>autoware_cmake</build_depend>

<depend>autoware_auto_perception_msgs</depend>
<depend>autoware_auto_planning_msgs</depend>
Expand Down
15 changes: 2 additions & 13 deletions planning/planning_error_monitor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(planning_error_monitor)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
find_package(autoware_cmake REQUIRED)
autoware_package()

ament_auto_add_library(planning_error_monitor_node SHARED
src/planning_error_monitor_node.cpp
Expand All @@ -31,8 +22,6 @@ rclcpp_components_register_node(invalid_trajectory_publisher_node
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
ament_add_gtest(test_planning_error_monitor
test/src/test_main.cpp
test/src/test_planning_error_monitor_functions.cpp
Expand Down
1 change: 1 addition & 0 deletions planning/planning_error_monitor/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
<build_depend>autoware_cmake</build_depend>

<depend>autoware_auto_planning_msgs</depend>
<depend>diagnostic_updater</depend>
Expand Down
18 changes: 2 additions & 16 deletions planning/route_handler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(route_handler)

### Compile options
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif()

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
find_package(autoware_cmake REQUIRED)
autoware_package()

ament_auto_add_library(route_handler SHARED
src/route_handler.cpp
)

# Test
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package()
1 change: 1 addition & 0 deletions planning/route_handler/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<maintainer email="fumiya.watanabe@tier4.jp">Fumiya Watanabe</maintainer>
<license>Apache License 2.0</license>
<buildtool_depend>ament_cmake_auto</buildtool_depend>
<build_depend>autoware_cmake</build_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>
Expand Down
20 changes: 2 additions & 18 deletions planning/scenario_selector/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(scenario_selector)

### Compile options
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

## Dependencies
find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
find_package(autoware_cmake REQUIRED)
autoware_package()

# Target

Expand All @@ -32,11 +21,6 @@ rclcpp_components_register_node(scenario_selector_node
EXECUTABLE scenario_selector
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package(INSTALL_TO_SHARE
launch
)
1 change: 1 addition & 0 deletions planning/scenario_selector/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
<build_depend>autoware_cmake</build_depend>

<depend>autoware_auto_mapping_msgs</depend>
<depend>autoware_auto_planning_msgs</depend>
Expand Down
19 changes: 2 additions & 17 deletions planning/surround_obstacle_checker/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
cmake_minimum_required(VERSION 3.5)
project(surround_obstacle_checker)

### Compile options
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
find_package(autoware_cmake REQUIRED)
autoware_package()

find_package(ament_cmake REQUIRED)
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(PCL REQUIRED COMPONENTS common)
find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

ament_auto_add_library(${PROJECT_NAME} SHARED
src/debug_marker.cpp
Expand All @@ -32,11 +22,6 @@ rclcpp_components_register_node(${PROJECT_NAME}
EXECUTABLE ${PROJECT_NAME}_node
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package(
INSTALL_TO_SHARE
config
Expand Down
2 changes: 2 additions & 0 deletions planning/surround_obstacle_checker/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>eigen3_cmake_module</buildtool_depend>
<build_depend>autoware_cmake</build_depend>

<depend>autoware_auto_perception_msgs</depend>
<depend>autoware_auto_planning_msgs</depend>
<depend>diagnostic_msgs</depend>
Expand Down