Skip to content

Commit

Permalink
feat(perception): use autoware_cmake to avoid Boost warning (#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
h-ohta authored May 26, 2023
1 parent 12efad6 commit bebc2f0
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 95 deletions.
19 changes: 2 additions & 17 deletions perception/elevation_map_loader/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(elevation_map_loader)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
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(PCL REQUIRED COMPONENTS io)

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

ament_auto_add_library(elevation_map_loader_node SHARED
src/elevation_map_loader_node.cpp
)
Expand All @@ -26,11 +16,6 @@ rclcpp_components_register_node(elevation_map_loader_node
EXECUTABLE elevation_map_loader
)

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

ament_auto_package(INSTALL_TO_SHARE
launch
config
Expand Down
3 changes: 1 addition & 2 deletions perception/elevation_map_loader/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
<maintainer email="[email protected]">Taichi Higashide</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_auto</buildtool_depend>

<build_depend>autoware_cmake</build_depend>
<depend>autoware_auto_mapping_msgs</depend>
<depend>grid_map_cv</depend>
<depend>grid_map_pcl</depend>
Expand Down
32 changes: 2 additions & 30 deletions perception/ground_segmentation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,15 @@
cmake_minimum_required(VERSION 3.5)
project(ground_segmentation)

### 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()

# Ignore PCL errors in Clang
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-gnu-anonymous-struct -Wno-nested-anon-types)
endif()

find_package(ament_cmake_auto REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(Boost REQUIRED)
find_package(PCL REQUIRED)
find_package(pcl_conversions REQUIRED)
find_package(OpenMP)
ament_auto_find_build_dependencies()


###########
## Build ##
###########

include_directories(
include
Expand Down Expand Up @@ -75,15 +56,6 @@ rclcpp_components_register_node(ground_segmentation
PLUGIN "ground_segmentation::ScanGroundFilterComponent"
EXECUTABLE scan_ground_filter_node)

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

#############
## Install ##
#############

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

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

<depend>libopencv-dev</depend>
<depend>pcl_conversions</depend>
Expand Down
32 changes: 2 additions & 30 deletions perception/occupancy_grid_map_outlier_filter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(occupancy_grid_map_outlier_filter)

### 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()

# Ignore PCL errors in Clang
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-gnu-anonymous-struct -Wno-nested-anon-types)
endif()

find_package(ament_cmake_auto REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(Boost REQUIRED)
Expand All @@ -25,11 +12,6 @@ find_package(pcl_conversions REQUIRED)
find_package(OpenMP)
ament_auto_find_build_dependencies()


###########
## Build ##
###########

include_directories(
include
SYSTEM
Expand Down Expand Up @@ -63,14 +45,4 @@ rclcpp_components_register_node(occupancy_grid_map_outlier_filter
PLUGIN "occupancy_grid_map_outlier_filter::OccupancyGridMapOutlierFilterComponent"
EXECUTABLE occupancy_grid_map_outlier_filter_node)


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

#############
## Install ##
#############

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

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

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

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(PCL REQUIRED COMPONENTS common)
find_package(pcl_conversions REQUIRED)
Expand Down Expand Up @@ -73,11 +64,6 @@ rclcpp_components_register_node(shape_estimation_node
EXECUTABLE shape_estimation
)

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 perception/shape_estimation/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</buildtool_depend>
<build_depend>autoware_cmake</build_depend>

<depend>autoware_auto_perception_msgs</depend>
<depend>builtin_interfaces</depend>
Expand Down

0 comments on commit bebc2f0

Please sign in to comment.