diff --git a/common/autoware_ad_api_msgs/CMakeLists.txt b/common/autoware_ad_api_msgs/CMakeLists.txt
index 74f2196f189c0..8ea4fbd663595 100644
--- a/common/autoware_ad_api_msgs/CMakeLists.txt
+++ b/common/autoware_ad_api_msgs/CMakeLists.txt
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(autoware_ad_api_msgs)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
rosidl_generate_interfaces(${PROJECT_NAME}
srv/InterfaceVersion.srv
@@ -12,9 +12,4 @@ rosidl_generate_interfaces(${PROJECT_NAME}
geometry_msgs
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package()
diff --git a/common/autoware_auto_common/CMakeLists.txt b/common/autoware_auto_common/CMakeLists.txt
index 99bdb5643009d..0c4666cc2d669 100644
--- a/common/autoware_auto_common/CMakeLists.txt
+++ b/common/autoware_auto_common/CMakeLists.txt
@@ -19,33 +19,13 @@ cmake_minimum_required(VERSION 3.5)
### Export headers
project(autoware_auto_common)
-## dependencies
-find_package(ament_cmake_auto REQUIRED)
-find_package(Eigen3 REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
+find_package(Eigen3 REQUIRED)
include_directories(SYSTEM ${EIGEN3_INCLUDE_DIR})
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
-
- # Temporarily disable cpplint and uncrustify
- list(APPEND AMENT_LINT_AUTO_EXCLUDE
- ament_cmake_cpplint
- )
-
- ament_lint_auto_find_test_dependencies()
-
- file(GLOB_RECURSE FILES_MINUS_SOME
- ${CMAKE_CURRENT_SOURCE_DIR}/include/*
- ${CMAKE_CURRENT_SOURCE_DIR}/test/*
- )
-
- # Re-enable cpplint
- find_package(ament_cmake_cpplint)
- ament_cpplint(${FILES_MINUS_SOME})
-
- # Unit tests
set(TEST_COMMON test_common_gtest)
ament_add_gtest(${TEST_COMMON}
test/gtest_main.cpp
@@ -68,5 +48,4 @@ if(BUILD_TESTING)
)
endif()
-# Ament Exporting
ament_auto_package()
diff --git a/common/autoware_auto_geometry/CMakeLists.txt b/common/autoware_auto_geometry/CMakeLists.txt
index 306348f2a9b85..e0f252401cec7 100644
--- a/common/autoware_auto_geometry/CMakeLists.txt
+++ b/common/autoware_auto_geometry/CMakeLists.txt
@@ -18,11 +18,9 @@ cmake_minimum_required(VERSION 3.5)
### Export headers
project(autoware_auto_geometry)
-## dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
-# includes
ament_auto_add_library(${PROJECT_NAME} SHARED
include/geometry/spatial_hash.hpp
include/geometry/intersection.hpp
@@ -38,10 +36,6 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
endif()
if(BUILD_TESTING)
- # run linters
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
- # gtest
set(GEOMETRY_GTEST geometry_gtest)
set(GEOMETRY_SRC test/src/test_geometry.cpp
test/src/test_convex_hull.cpp
@@ -65,5 +59,4 @@ if(BUILD_TESTING)
target_link_libraries(${GEOMETRY_GTEST} ${PROJECT_NAME})
endif()
-# Ament Exporting
ament_auto_package()
diff --git a/common/autoware_auto_perception_rviz_plugin/CMakeLists.txt b/common/autoware_auto_perception_rviz_plugin/CMakeLists.txt
index a02a01e0a9145..565d807eaa6d0 100644
--- a/common/autoware_auto_perception_rviz_plugin/CMakeLists.txt
+++ b/common/autoware_auto_perception_rviz_plugin/CMakeLists.txt
@@ -17,10 +17,8 @@
cmake_minimum_required(VERSION 3.5)
project(autoware_auto_perception_rviz_plugin)
-#dependencies
-find_package(ament_cmake_auto REQUIRED)
-find_package(Qt5 REQUIRED COMPONENTS Widgets)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
set(OD_PLUGIN_LIB_SRC
src/object_detection/detected_objects_display.cpp
@@ -72,12 +70,6 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE "OBJECT_DETECTION_PLUGINS_BUI
# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins_description.xml)
-if(BUILD_TESTING)
- # run linters
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
icons
diff --git a/common/autoware_auto_tf2/CMakeLists.txt b/common/autoware_auto_tf2/CMakeLists.txt
index 0cc518be2d3db..709402b45130e 100755
--- a/common/autoware_auto_tf2/CMakeLists.txt
+++ b/common/autoware_auto_tf2/CMakeLists.txt
@@ -16,18 +16,10 @@ cmake_minimum_required(VERSION 3.5)
### Export headers
project(autoware_auto_tf2)
-## dependencies
-find_package(ament_cmake REQUIRED)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
-
-### Test
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- # Linters
- ament_lint_auto_find_test_dependencies()
- # Unit test
ament_add_gtest(test_tf2_autoware_auto_msgs test/test_tf2_autoware_auto_msgs.cpp)
# workaround to allow deprecated header to build on both galactic and rolling
if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
diff --git a/common/autoware_point_types/CMakeLists.txt b/common/autoware_point_types/CMakeLists.txt
index 40d450f4548ce..b498153a65301 100644
--- a/common/autoware_point_types/CMakeLists.txt
+++ b/common/autoware_point_types/CMakeLists.txt
@@ -1,18 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(autoware_point_types)
-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 -Werror)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
include_directories(
include
@@ -21,11 +11,6 @@ include_directories(
)
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
- find_package(ament_cmake_gtest REQUIRED)
-
ament_add_gtest(test_autoware_point_types
test/test_point_types.cpp
)
diff --git a/common/autoware_testing/CMakeLists.txt b/common/autoware_testing/CMakeLists.txt
index 55270a3738829..d8c017f6351c7 100644
--- a/common/autoware_testing/CMakeLists.txt
+++ b/common/autoware_testing/CMakeLists.txt
@@ -13,21 +13,15 @@
# limitations under the License.
cmake_minimum_required(VERSION 3.5)
-
project(autoware_testing)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
+find_package(autoware_cmake REQUIRED)
+autoware_package()
list(APPEND ${PROJECT_NAME}_CONFIG_EXTRAS
"autoware_testing-extras.cmake"
)
-if(BUILD_TESTING)
- ament_lint_cmake(${CMAKE_CURRENT_SOURCE_DIR})
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE cmake autoware_testing
)
diff --git a/common/component_interface_utils/CMakeLists.txt b/common/component_interface_utils/CMakeLists.txt
index ba32ad10851d5..5134b2f7cf3c2 100644
--- a/common/component_interface_utils/CMakeLists.txt
+++ b/common/component_interface_utils/CMakeLists.txt
@@ -1,22 +1,7 @@
cmake_minimum_required(VERSION 3.8)
project(component_interface_utils)
-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 -Werror)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package()
diff --git a/common/fake_test_node/CMakeLists.txt b/common/fake_test_node/CMakeLists.txt
index 6fa156aee49a6..171bf5b9a36d8 100644
--- a/common/fake_test_node/CMakeLists.txt
+++ b/common/fake_test_node/CMakeLists.txt
@@ -17,18 +17,12 @@
cmake_minimum_required(VERSION 3.5)
project(fake_test_node)
-find_package(ament_cmake_auto REQUIRED)
-
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_library(fake_test_node SHARED src/fake_test_node.cpp)
-## Testing
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
- find_package(ament_cmake_gtest REQUIRED)
ament_add_gtest(test_fake_test_node
test/test_fake_test_node.cpp
)
diff --git a/common/global_parameter_loader/CMakeLists.txt b/common/global_parameter_loader/CMakeLists.txt
index 06ab9ac22158f..468b60919b668 100644
--- a/common/global_parameter_loader/CMakeLists.txt
+++ b/common/global_parameter_loader/CMakeLists.txt
@@ -1,13 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(global_parameter_loader)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(
INSTALL_TO_SHARE
diff --git a/common/goal_distance_calculator/CMakeLists.txt b/common/goal_distance_calculator/CMakeLists.txt
index 4d188e6772e45..a7999e8f5f5c6 100644
--- a/common/goal_distance_calculator/CMakeLists.txt
+++ b/common/goal_distance_calculator/CMakeLists.txt
@@ -1,14 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(goal_distance_calculator)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
- set(CMAKE_CXX_EXTENSIONS OFF)
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_library(goal_distance_calculator SHARED
src/goal_distance_calculator_node.cpp
@@ -27,11 +21,6 @@ rclcpp_components_register_node(goal_distance_calculator
EXECUTABLE goal_distance_calculator_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/common/had_map_utils/CMakeLists.txt b/common/had_map_utils/CMakeLists.txt
index 6abfe94a38b44..2528f2106892c 100644
--- a/common/had_map_utils/CMakeLists.txt
+++ b/common/had_map_utils/CMakeLists.txt
@@ -5,18 +5,11 @@ cmake_minimum_required(VERSION 3.5)
### Export headers
project(had_map_utils)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
-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)
find_package(CGAL REQUIRED COMPONENTS Core)
find_package(Eigen3 REQUIRED)
-ament_auto_find_build_dependencies()
ament_auto_add_library(${PROJECT_NAME} SHARED
src/had_map_utils.cpp
@@ -38,9 +31,4 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
set(CGAL_DO_NOT_WARN_ABOUT_CMAKE_BUILD_TYPE TRUE)
target_link_libraries(${PROJECT_NAME} CGAL CGAL::CGAL CGAL::CGAL_Core)
-# if(BUILD_TESTING)
-# find_package(ament_lint_auto REQUIRED)
-# ament_lint_auto_find_test_dependencies()
-# endif()
-
ament_auto_package()
diff --git a/common/interpolation/CMakeLists.txt b/common/interpolation/CMakeLists.txt
index 6cec2a295d1fc..d8de3da7c87a4 100644
--- a/common/interpolation/CMakeLists.txt
+++ b/common/interpolation/CMakeLists.txt
@@ -1,16 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(interpolation)
-### 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(interpolation SHARED
src/linear_interpolation.cpp
@@ -25,13 +17,7 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-# Test
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
- find_package(ament_cmake_gtest REQUIRED)
-
file(GLOB_RECURSE test_files test/**/*.cpp)
ament_add_gtest(test_interpolation ${test_files})
diff --git a/common/interpolation/package.xml b/common/interpolation/package.xml
index 3a04c75a89bf5..213616b007a19 100644
--- a/common/interpolation/package.xml
+++ b/common/interpolation/package.xml
@@ -14,6 +14,7 @@
tier4_autoware_utils
+ ament_cmake_gtest
ament_lint_auto
autoware_lint_common
diff --git a/common/kalman_filter/CMakeLists.txt b/common/kalman_filter/CMakeLists.txt
index 4419e3d7761eb..6ea1c9f9205c9 100644
--- a/common/kalman_filter/CMakeLists.txt
+++ b/common/kalman_filter/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(kalman_filter)
-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()
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
@@ -23,9 +14,4 @@ ament_auto_add_library(kalman_filter SHARED
include/kalman_filter/time_delay_kalman_filter.hpp
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package()
diff --git a/common/motion_common/CMakeLists.txt b/common/motion_common/CMakeLists.txt
index a8926cb417325..4a21808559dca 100644
--- a/common/motion_common/CMakeLists.txt
+++ b/common/motion_common/CMakeLists.txt
@@ -1,13 +1,11 @@
cmake_minimum_required(VERSION 3.6)
-
project(motion_common)
-### Dependencies
-find_package(ament_cmake_auto REQUIRED)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
+
find_package(Eigen3 REQUIRED)
-ament_auto_find_build_dependencies()
-# Build library
ament_auto_add_library(${PROJECT_NAME} SHARED
src/motion_common/config.cpp
src/motion_common/motion_common.cpp
@@ -21,9 +19,7 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-### Test
if(BUILD_TESTING)
- # Linters
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
diff --git a/common/motion_testing/CMakeLists.txt b/common/motion_testing/CMakeLists.txt
index ac8cc14c79aba..0cb936271a478 100644
--- a/common/motion_testing/CMakeLists.txt
+++ b/common/motion_testing/CMakeLists.txt
@@ -1,12 +1,9 @@
cmake_minimum_required(VERSION 3.6)
-
project(motion_testing)
-### Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
-### Build
ament_auto_add_library(${PROJECT_NAME} SHARED src/motion_testing/motion_testing.cpp)
# workaround to allow deprecated header to build on both galactic and rolling
@@ -16,12 +13,7 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-### Test
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- # Linters
- ament_lint_auto_find_test_dependencies()
- # Unit test
ament_add_gtest(motion_testing_unit_tests
test/gtest_main.cpp
test/constant_trajectory.cpp
diff --git a/common/osqp_interface/CMakeLists.txt b/common/osqp_interface/CMakeLists.txt
index c069530add100..05313d80235d8 100644
--- a/common/osqp_interface/CMakeLists.txt
+++ b/common/osqp_interface/CMakeLists.txt
@@ -16,14 +16,10 @@ cmake_minimum_required(VERSION 3.5)
project(osqp_interface)
-# require that dependencies from package.xml be available
-find_package(ament_cmake_auto REQUIRED)
-find_package(Eigen3 REQUIRED)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
-ament_auto_find_build_dependencies(REQUIRED
- ${${PROJECT_NAME}_BUILD_DEPENDS}
- ${${PROJECT_NAME}_BUILDTOOL_DEPENDS}
-)
+find_package(Eigen3 REQUIRED)
# after find_package(osqp_vendor) in ament_auto_find_build_dependencies
find_package(osqp REQUIRED)
@@ -41,7 +37,6 @@ set(OSQP_INTERFACE_LIB_HEADERS
include/osqp_interface/visibility_control.hpp
)
-# generate library
ament_auto_add_library(${PROJECT_NAME} SHARED
${OSQP_INTERFACE_LIB_SRC}
${OSQP_INTERFACE_LIB_HEADERS}
@@ -63,12 +58,7 @@ ament_export_include_directories("${OSQP_INCLUDE_DIR}")
# crucial so the linking order is correct in a downstream package: libosqp_interface.a should come before libosqp.a
ament_export_libraries(osqp::osqp)
-# Testing
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
- # Unit tests
set(TEST_SOURCES
test/test_osqp_interface.cpp
test/test_csc_matrix_conv.cpp
@@ -78,6 +68,5 @@ if(BUILD_TESTING)
target_link_libraries(${TEST_OSQP_INTERFACE_EXE} ${PROJECT_NAME})
endif()
-# ament package generation and installing
ament_auto_package(INSTALL_TO_SHARE
)
diff --git a/common/path_distance_calculator/CMakeLists.txt b/common/path_distance_calculator/CMakeLists.txt
index 665e92f641597..8d1718043c6c5 100644
--- a/common/path_distance_calculator/CMakeLists.txt
+++ b/common/path_distance_calculator/CMakeLists.txt
@@ -1,18 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(path_distance_calculator)
-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(${PROJECT_NAME} SHARED
src/path_distance_calculator.cpp
@@ -30,9 +20,4 @@ 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 launch)
diff --git a/common/polar_grid/CMakeLists.txt b/common/polar_grid/CMakeLists.txt
index 8d9b69fe0e8c1..d0ec524a18388 100644
--- a/common/polar_grid/CMakeLists.txt
+++ b/common/polar_grid/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(polar_grid)
-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()
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
@@ -37,11 +28,6 @@ install(TARGETS
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
icons
diff --git a/common/signal_processing/CMakeLists.txt b/common/signal_processing/CMakeLists.txt
index 563bb7d365af5..072b55dfab4cb 100644
--- a/common/signal_processing/CMakeLists.txt
+++ b/common/signal_processing/CMakeLists.txt
@@ -1,25 +1,14 @@
cmake_minimum_required(VERSION 3.5)
project(signal_processing)
-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(lowpass_filter_1d SHARED
src/lowpass_filter_1d.cpp
)
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
ament_add_gtest(test_signal_processing
test/src/lowpass_filter_1d_test.cpp
)
diff --git a/common/tier4_api_utils/CMakeLists.txt b/common/tier4_api_utils/CMakeLists.txt
index 1beed4368d313..ac89ae4c275d5 100644
--- a/common/tier4_api_utils/CMakeLists.txt
+++ b/common/tier4_api_utils/CMakeLists.txt
@@ -1,24 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_api_utils)
-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 -Werror)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- find_package(ament_cmake_gtest REQUIRED)
include_directories(include)
- ament_lint_auto_find_test_dependencies()
ament_add_gtest(${PROJECT_NAME}_test test/test.cpp)
ament_target_dependencies(${PROJECT_NAME}_test rclcpp tier4_external_api_msgs)
endif()
diff --git a/common/tier4_autoware_utils/CMakeLists.txt b/common/tier4_autoware_utils/CMakeLists.txt
index 62b2bb6bc1b20..3b01501271c61 100644
--- a/common/tier4_autoware_utils/CMakeLists.txt
+++ b/common/tier4_autoware_utils/CMakeLists.txt
@@ -1,16 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_autoware_utils)
-### 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()
find_package(Boost REQUIRED)
@@ -26,11 +18,7 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-# Test
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
find_package(ament_cmake_gtest REQUIRED)
file(GLOB_RECURSE test_files test/**/*.cpp)
diff --git a/common/tier4_calibration_rviz_plugin/CMakeLists.txt b/common/tier4_calibration_rviz_plugin/CMakeLists.txt
index 5354c44a434c0..eff818e7dbca7 100644
--- a/common/tier4_calibration_rviz_plugin/CMakeLists.txt
+++ b/common/tier4_calibration_rviz_plugin/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_calibration_rviz_plugin)
-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(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
@@ -30,11 +21,6 @@ target_link_libraries(${PROJECT_NAME}
# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
plugins
diff --git a/common/tier4_datetime_rviz_plugin/CMakeLists.txt b/common/tier4_datetime_rviz_plugin/CMakeLists.txt
index b35caa4d5a2cb..3c8a097ca768e 100644
--- a/common/tier4_datetime_rviz_plugin/CMakeLists.txt
+++ b/common/tier4_datetime_rviz_plugin/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_datetime_rviz_plugin)
-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 -Werror)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
@@ -28,11 +19,6 @@ target_link_libraries(${PROJECT_NAME}
)
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
icons
diff --git a/common/tier4_debug_tools/CMakeLists.txt b/common/tier4_debug_tools/CMakeLists.txt
index 13127581a044c..ea0a672fc1399 100644
--- a/common/tier4_debug_tools/CMakeLists.txt
+++ b/common/tier4_debug_tools/CMakeLists.txt
@@ -1,22 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_debug_tools)
-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)
-#ament_python_install_package(${PROJECT_NAME} PACKAGE_DIR "scripts/")
-
ament_auto_add_library(lateral_error_publisher SHARED
src/lateral_error_publisher.cpp
)
@@ -33,11 +22,6 @@ rclcpp_components_register_node(lateral_error_publisher
EXECUTABLE lateral_error_publisher_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
config
diff --git a/common/tier4_localization_rviz_plugin/CMakeLists.txt b/common/tier4_localization_rviz_plugin/CMakeLists.txt
index eb3b1605c7ca6..be8d3c45c56c0 100644
--- a/common/tier4_localization_rviz_plugin/CMakeLists.txt
+++ b/common/tier4_localization_rviz_plugin/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_localization_rviz_plugin)
-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()
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
@@ -31,11 +22,6 @@ target_link_libraries(${PROJECT_NAME}
# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
icons
diff --git a/common/tier4_perception_rviz_plugin/CMakeLists.txt b/common/tier4_perception_rviz_plugin/CMakeLists.txt
index a4a058655ea14..c77e9b815cb81 100644
--- a/common/tier4_perception_rviz_plugin/CMakeLists.txt
+++ b/common/tier4_perception_rviz_plugin/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_perception_rviz_plugin)
-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(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
@@ -42,11 +33,6 @@ endif()
# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
icons
diff --git a/common/tier4_planning_rviz_plugin/CMakeLists.txt b/common/tier4_planning_rviz_plugin/CMakeLists.txt
index 3050f9e1904f1..4e056665c5adb 100644
--- a/common/tier4_planning_rviz_plugin/CMakeLists.txt
+++ b/common/tier4_planning_rviz_plugin/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_planning_rviz_plugin)
-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()
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
@@ -55,11 +46,6 @@ endif()
# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
icons
diff --git a/common/tier4_simulated_clock_rviz_plugin/CMakeLists.txt b/common/tier4_simulated_clock_rviz_plugin/CMakeLists.txt
index 6418b77a661a4..a646d4e292213 100644
--- a/common/tier4_simulated_clock_rviz_plugin/CMakeLists.txt
+++ b/common/tier4_simulated_clock_rviz_plugin/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_simulated_clock_rviz_plugin)
-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 -Werror)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
@@ -30,11 +21,6 @@ target_link_libraries(${PROJECT_NAME}
# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
icons
diff --git a/common/tier4_state_rviz_plugin/CMakeLists.txt b/common/tier4_state_rviz_plugin/CMakeLists.txt
index a2cf6b29e5cd4..fbf2c50106bb3 100644
--- a/common/tier4_state_rviz_plugin/CMakeLists.txt
+++ b/common/tier4_state_rviz_plugin/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_state_rviz_plugin)
-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 -Werror)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
@@ -30,11 +21,6 @@ target_link_libraries(${PROJECT_NAME}
# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
icons
diff --git a/common/tier4_traffic_light_rviz_plugin/CMakeLists.txt b/common/tier4_traffic_light_rviz_plugin/CMakeLists.txt
index a9e6d1c3f8085..d95848928ffa2 100644
--- a/common/tier4_traffic_light_rviz_plugin/CMakeLists.txt
+++ b/common/tier4_traffic_light_rviz_plugin/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_traffic_light_rviz_plugin)
-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 -Werror)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
@@ -30,11 +21,6 @@ target_link_libraries(${PROJECT_NAME}
# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
icons
diff --git a/common/tier4_vehicle_rviz_plugin/CMakeLists.txt b/common/tier4_vehicle_rviz_plugin/CMakeLists.txt
index 1458165711aad..6d49d5144f1f7 100644
--- a/common/tier4_vehicle_rviz_plugin/CMakeLists.txt
+++ b/common/tier4_vehicle_rviz_plugin/CMakeLists.txt
@@ -1,15 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_vehicle_rviz_plugin)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-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()
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
@@ -50,11 +43,6 @@ endif()
# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
icons
diff --git a/common/time_utils/CMakeLists.txt b/common/time_utils/CMakeLists.txt
index 7bd1b08331f98..80d59a39762f6 100644
--- a/common/time_utils/CMakeLists.txt
+++ b/common/time_utils/CMakeLists.txt
@@ -1,20 +1,9 @@
cmake_minimum_required(VERSION 3.6)
-
project(time_utils)
-### Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
-### Build
ament_auto_add_library(${PROJECT_NAME} SHARED src/time_utils/time_utils.cpp)
-### Test
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- # Linters
- ament_lint_auto_find_test_dependencies()
- # TODO(c.ho) unit tests
-endif()
-
ament_auto_package()
diff --git a/common/vehicle_constants_manager/CMakeLists.txt b/common/vehicle_constants_manager/CMakeLists.txt
index 4a14b116f5643..0fd5b081b671d 100644
--- a/common/vehicle_constants_manager/CMakeLists.txt
+++ b/common/vehicle_constants_manager/CMakeLists.txt
@@ -16,9 +16,8 @@ cmake_minimum_required(VERSION 3.5)
project(vehicle_constants_manager)
-# require that dependencies from package.xml be available
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
set(VEHICLE_CONSTANTS_MANAGER_LIB_SRC
src/vehicle_constants_manager.cpp)
@@ -27,22 +26,15 @@ set(VEHICLE_CONSTANTS_MANAGER_LIB_HEADERS
include/vehicle_constants_manager/vehicle_constants_manager.hpp
include/vehicle_constants_manager/visibility_control.hpp)
-# generate library
ament_auto_add_library(${PROJECT_NAME} SHARED
${VEHICLE_CONSTANTS_MANAGER_LIB_SRC}
${VEHICLE_CONSTANTS_MANAGER_LIB_HEADERS})
-# Testing
# if(BUILD_TESTING)
-# find_package(ament_lint_auto REQUIRED)
-# ament_lint_auto_find_test_dependencies()
-
-# # Unit tests
# set(TEST_SOURCES test/test_vehicle_constants_manager.cpp)
# set(TEST_VEHICLE_CONSTANTS_MANAGER_EXE test_vehicle_constants_manager)
# ament_add_gtest(${TEST_VEHICLE_CONSTANTS_MANAGER_EXE} ${TEST_SOURCES})
# target_link_libraries(${TEST_VEHICLE_CONSTANTS_MANAGER_EXE} ${PROJECT_NAME})
# endif()
-# ament package generation and installing
ament_auto_package(INSTALL_TO_SHARE)
diff --git a/common/web_controller/CMakeLists.txt b/common/web_controller/CMakeLists.txt
index 7ffdcb57798e6..e0014c14daa44 100644
--- a/common/web_controller/CMakeLists.txt
+++ b/common/web_controller/CMakeLists.txt
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(web_controller)
-find_package(ament_cmake REQUIRED)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
install(DIRECTORY
launch
diff --git a/control/control_performance_analysis/CMakeLists.txt b/control/control_performance_analysis/CMakeLists.txt
index a5c9e74a0bff9..996a7f41be6e6 100644
--- a/control/control_performance_analysis/CMakeLists.txt
+++ b/control/control_performance_analysis/CMakeLists.txt
@@ -1,18 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(control_performance_analysis)
-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(Boost REQUIRED)
@@ -60,11 +50,6 @@ rclcpp_components_register_node(control_performance_analysis_node
EXECUTABLE control_performance_analysis
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/control/external_cmd_selector/CMakeLists.txt b/control/external_cmd_selector/CMakeLists.txt
index c195671489fcc..f0c7e77c69aa1 100644
--- a/control/external_cmd_selector/CMakeLists.txt
+++ b/control/external_cmd_selector/CMakeLists.txt
@@ -1,19 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(external_cmd_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 -Werror)
-endif()
-
-### Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_library(external_cmd_selector_node SHARED
src/external_cmd_selector/external_cmd_selector_node.cpp
@@ -24,11 +13,6 @@ rclcpp_components_register_node(external_cmd_selector_node
EXECUTABLE external_cmd_selector
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/control/joy_controller/CMakeLists.txt b/control/joy_controller/CMakeLists.txt
index 841c18d11c804..1fa2f13b0f995 100644
--- a/control/joy_controller/CMakeLists.txt
+++ b/control/joy_controller/CMakeLists.txt
@@ -1,15 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(joy_controller)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-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(joy_controller_node SHARED
src/joy_controller/joy_controller_node.cpp
@@ -20,11 +13,6 @@ rclcpp_components_register_node(joy_controller_node
EXECUTABLE joy_controller
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/control/lane_departure_checker/CMakeLists.txt b/control/lane_departure_checker/CMakeLists.txt
index a40f0b4a9ae4e..1078912ef99c9 100644
--- a/control/lane_departure_checker/CMakeLists.txt
+++ b/control/lane_departure_checker/CMakeLists.txt
@@ -1,19 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(lane_departure_checker)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-### 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()
include_directories(
include
@@ -21,8 +10,6 @@ include_directories(
${EIGEN3_INCLUDE_DIRS}
)
-# Target
-## lane_departure_checker_node
ament_auto_add_library(lane_departure_checker SHARED
src/lane_departure_checker_node/lane_departure_checker.cpp
src/lane_departure_checker_node/lane_departure_checker_node.cpp
@@ -40,11 +27,6 @@ rclcpp_components_register_node(lane_departure_checker
EXECUTABLE lane_departure_checker_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/control/obstacle_collision_checker/CMakeLists.txt b/control/obstacle_collision_checker/CMakeLists.txt
index e13747c2711e8..d96c9af65f249 100644
--- a/control/obstacle_collision_checker/CMakeLists.txt
+++ b/control/obstacle_collision_checker/CMakeLists.txt
@@ -1,19 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(obstacle_collision_checker)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-### 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()
include_directories(
include
@@ -22,8 +11,6 @@ include_directories(
${EIGEN3_INCLUDE_DIRS}
)
-# Target
-## obstacle_collision_checker_node
ament_auto_add_library(obstacle_collision_checker SHARED
src/obstacle_collision_checker_node/obstacle_collision_checker.cpp
src/obstacle_collision_checker_node/obstacle_collision_checker_node.cpp
@@ -42,8 +29,6 @@ rclcpp_components_register_node(obstacle_collision_checker
)
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
ament_add_ros_isolated_gtest(test_obstacle_collision_checker
test/test_obstacle_collision_checker.cpp
)
diff --git a/control/pure_pursuit/CMakeLists.txt b/control/pure_pursuit/CMakeLists.txt
index ccab9dcdd0fd5..45b7d2f9b9ed5 100644
--- a/control/pure_pursuit/CMakeLists.txt
+++ b/control/pure_pursuit/CMakeLists.txt
@@ -1,21 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(pure_pursuit)
-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)
-
include_directories(
${EIGEN3_INCLUDE_DIRS}
)
@@ -56,11 +46,6 @@ rclcpp_components_register_node(pure_pursuit_node
EXECUTABLE pure_pursuit_node_exe
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
config
diff --git a/control/shift_decider/CMakeLists.txt b/control/shift_decider/CMakeLists.txt
index 6e2e94098646c..a57ee908fa223 100644
--- a/control/shift_decider/CMakeLists.txt
+++ b/control/shift_decider/CMakeLists.txt
@@ -1,14 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(shift_decider)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
- set(CMAKE_CXX_EXTENSIONS OFF)
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_library(shift_decider_node SHARED
src/shift_decider.cpp
@@ -19,11 +13,6 @@ rclcpp_components_register_node(shift_decider_node
EXECUTABLE shift_decider
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/control/trajectory_follower/CMakeLists.txt b/control/trajectory_follower/CMakeLists.txt
index c14429798d962..606c63bbfd262 100644
--- a/control/trajectory_follower/CMakeLists.txt
+++ b/control/trajectory_follower/CMakeLists.txt
@@ -16,12 +16,8 @@ cmake_minimum_required(VERSION 3.5)
project(trajectory_follower)
-# require that dependencies from package.xml be available
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies(REQUIRED
- ${${PROJECT_NAME}_BUILD_DEPENDS}
- ${${PROJECT_NAME}_BUILDTOOL_DEPENDS}
-)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
# lateral_controller
set(LATERAL_CONTROLLER_LIB lateral_controller_lib)
@@ -55,7 +51,6 @@ set(LATERAL_CONTROLLER_LIB_HEADERS
include/trajectory_follower/vehicle_model/vehicle_model_interface.hpp
)
-# generate library
ament_auto_add_library(${LATERAL_CONTROLLER_LIB} SHARED
${LATERAL_CONTROLLER_LIB_SRC}
${LATERAL_CONTROLLER_LIB_HEADERS}
@@ -84,7 +79,6 @@ set(LONGITUDINAL_CONTROLLER_LIB_HEADERS
include/trajectory_follower/longitudinal_controller_utils.hpp
)
-# generate library
ament_auto_add_library(${LONGITUDINAL_CONTROLLER_LIB} SHARED
${LONGITUDINAL_CONTROLLER_LIB_SRC}
${LONGITUDINAL_CONTROLLER_LIB_HEADERS}
@@ -98,12 +92,7 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-# Testing
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
- # Unit tests
set(TEST_LAT_SOURCES
test/test_mpc.cpp
test/test_mpc_trajectory.cpp
@@ -140,6 +129,5 @@ if(BUILD_TESTING)
endif()
endif()
-# ament package generation and installing
ament_auto_package(INSTALL_TO_SHARE
)
diff --git a/control/trajectory_follower_nodes/CMakeLists.txt b/control/trajectory_follower_nodes/CMakeLists.txt
index 3d9741d7bdbd6..dbfd0e770692d 100644
--- a/control/trajectory_follower_nodes/CMakeLists.txt
+++ b/control/trajectory_follower_nodes/CMakeLists.txt
@@ -15,8 +15,8 @@
cmake_minimum_required(VERSION 3.5)
project(trajectory_follower_nodes)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
set(LATERAL_CONTROLLER_NODE lateral_controller_node)
ament_auto_add_library(${LATERAL_CONTROLLER_NODE} SHARED
@@ -68,9 +68,6 @@ rclcpp_components_register_node(${LATLON_MUXER_NODE}
)
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
- # Unit tests
set(TRAJECTORY_FOLLOWER_NODES_TEST test_trajectory_follower_nodes)
ament_add_ros_isolated_gtest(${TRAJECTORY_FOLLOWER_NODES_TEST}
test/trajectory_follower_test_utils.hpp
diff --git a/control/vehicle_cmd_gate/CMakeLists.txt b/control/vehicle_cmd_gate/CMakeLists.txt
index fdb405ac4f6aa..274f326d102b7 100644
--- a/control/vehicle_cmd_gate/CMakeLists.txt
+++ b/control/vehicle_cmd_gate/CMakeLists.txt
@@ -1,21 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(vehicle_cmd_gate)
-### 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()
-### Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-# Generate exe file
ament_auto_add_library(vehicle_cmd_gate_node SHARED
src/vehicle_cmd_gate.cpp
src/vehicle_cmd_filter.cpp
@@ -27,9 +15,6 @@ rclcpp_components_register_node(vehicle_cmd_gate_node
)
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
ament_add_gtest(test_vehicle_cmd_gate
test/src/test_main.cpp
test/src/test_vehicle_cmd_filter.cpp
diff --git a/launch/tier4_autoware_api_launch/CMakeLists.txt b/launch/tier4_autoware_api_launch/CMakeLists.txt
index 95c4157c0122a..fe6d5d4b4ea41 100644
--- a/launch/tier4_autoware_api_launch/CMakeLists.txt
+++ b/launch/tier4_autoware_api_launch/CMakeLists.txt
@@ -1,12 +1,7 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_autoware_api_launch)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(INSTALL_TO_SHARE launch)
diff --git a/launch/tier4_control_launch/CMakeLists.txt b/launch/tier4_control_launch/CMakeLists.txt
index b6b85a652aad8..3bd7c45fa8032 100644
--- a/launch/tier4_control_launch/CMakeLists.txt
+++ b/launch/tier4_control_launch/CMakeLists.txt
@@ -1,20 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_control_launch)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-endif()
-if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- add_compile_options(-Wno-unused-parameter -Wall -Wextra -Wpedantic)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(
INSTALL_TO_SHARE
diff --git a/launch/tier4_integration_launch/CMakeLists.txt b/launch/tier4_integration_launch/CMakeLists.txt
index 16ec58cb319e0..6abc592a4be1f 100644
--- a/launch/tier4_integration_launch/CMakeLists.txt
+++ b/launch/tier4_integration_launch/CMakeLists.txt
@@ -2,13 +2,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_integration_launch)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(
INSTALL_TO_SHARE
diff --git a/launch/tier4_localization_launch/CMakeLists.txt b/launch/tier4_localization_launch/CMakeLists.txt
index 2221e001f3b87..efa6394414a1a 100644
--- a/launch/tier4_localization_launch/CMakeLists.txt
+++ b/launch/tier4_localization_launch/CMakeLists.txt
@@ -1,20 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_localization_launch)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-endif()
-if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- add_compile_options(-Wall -Wextra -Wpedantic -Wno-unused-parameter)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(INSTALL_TO_SHARE
launch
diff --git a/launch/tier4_map_launch/CMakeLists.txt b/launch/tier4_map_launch/CMakeLists.txt
index 7ad8b620591ef..fa6d779fc5c40 100644
--- a/launch/tier4_map_launch/CMakeLists.txt
+++ b/launch/tier4_map_launch/CMakeLists.txt
@@ -1,20 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_map_launch)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-endif()
-if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- add_compile_options(-Wno-unused-parameter -Wall -Wextra -Wpedantic)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(
INSTALL_TO_SHARE
diff --git a/launch/tier4_perception_launch/CMakeLists.txt b/launch/tier4_perception_launch/CMakeLists.txt
index 5fc85d2ee4c56..fef1049b54b92 100644
--- a/launch/tier4_perception_launch/CMakeLists.txt
+++ b/launch/tier4_perception_launch/CMakeLists.txt
@@ -1,13 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_perception_launch)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(
INSTALL_TO_SHARE
diff --git a/launch/tier4_planning_launch/CMakeLists.txt b/launch/tier4_planning_launch/CMakeLists.txt
index 886b0215f3598..b0ab675c862f1 100644
--- a/launch/tier4_planning_launch/CMakeLists.txt
+++ b/launch/tier4_planning_launch/CMakeLists.txt
@@ -1,20 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_planning_launch)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-endif()
-if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- add_compile_options(-Wno-unused-parameter -Wall -Wextra -Wpedantic)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(
INSTALL_TO_SHARE
diff --git a/launch/tier4_sensing_launch/CMakeLists.txt b/launch/tier4_sensing_launch/CMakeLists.txt
index c313fd6105dc7..87cd3b4e259cc 100644
--- a/launch/tier4_sensing_launch/CMakeLists.txt
+++ b/launch/tier4_sensing_launch/CMakeLists.txt
@@ -1,13 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_sensing_launch)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(INSTALL_TO_SHARE
launch
diff --git a/launch/tier4_simulator_launch/CMakeLists.txt b/launch/tier4_simulator_launch/CMakeLists.txt
index 37e0aa2f6828f..ffc501b68964b 100644
--- a/launch/tier4_simulator_launch/CMakeLists.txt
+++ b/launch/tier4_simulator_launch/CMakeLists.txt
@@ -1,13 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_simulator_launch)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(INSTALL_TO_SHARE
launch
diff --git a/launch/tier4_system_launch/CMakeLists.txt b/launch/tier4_system_launch/CMakeLists.txt
index a4506ba6613aa..f1681aa39035f 100644
--- a/launch/tier4_system_launch/CMakeLists.txt
+++ b/launch/tier4_system_launch/CMakeLists.txt
@@ -1,18 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_system_launch)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(INSTALL_TO_SHARE
launch
diff --git a/launch/tier4_vehicle_launch/CMakeLists.txt b/launch/tier4_vehicle_launch/CMakeLists.txt
index 2281b95d869d7..b363a8ff68311 100644
--- a/launch/tier4_vehicle_launch/CMakeLists.txt
+++ b/launch/tier4_vehicle_launch/CMakeLists.txt
@@ -1,16 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_vehicle_launch)
-add_compile_options(-std=c++14)
-
-find_package(ament_cmake_auto REQUIRED)
-
-ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_package(INSTALL_TO_SHARE
launch
diff --git a/localization/ekf_localizer/CMakeLists.txt b/localization/ekf_localizer/CMakeLists.txt
index e62a6dcaa9d6a..aa70ff9c27bff 100644
--- a/localization/ekf_localizer/CMakeLists.txt
+++ b/localization/ekf_localizer/CMakeLists.txt
@@ -1,19 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(ekf_localizer)
-### 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 dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
find_package(Eigen3 REQUIRED)
@@ -45,11 +34,6 @@ endif()
# ament_target_dependencies(ekf_localizer-test geometry_msgs rclcpp tf2 tf2_ros)
# endif()
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/localization/gyro_odometer/CMakeLists.txt b/localization/gyro_odometer/CMakeLists.txt
index 6a4f79e5a3799..97c943fd8c7f2 100644
--- a/localization/gyro_odometer/CMakeLists.txt
+++ b/localization/gyro_odometer/CMakeLists.txt
@@ -1,28 +1,12 @@
cmake_minimum_required(VERSION 3.5)
project(gyro_odometer)
-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()
-
-set(GYRO_ODOMETER_SRC
- src/gyro_odometer_core.cpp)
-
-set(GYRO_ODOMETER_HEADERS
- include/gyro_odometer/gyro_odometer_core.hpp)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_executable(${PROJECT_NAME}
src/gyro_odometer_node.cpp
- ${GYRO_ODOMETER_SRC}
- ${GYRO_ODOMETER_HEADERS}
+ src/gyro_odometer_core.cpp
)
# workaround to allow deprecated header to build on both galactic and rolling
@@ -32,11 +16,6 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/localization/initial_pose_button_panel/CMakeLists.txt b/localization/initial_pose_button_panel/CMakeLists.txt
index b4194c5daf792..b9b24df565467 100644
--- a/localization/initial_pose_button_panel/CMakeLists.txt
+++ b/localization/initial_pose_button_panel/CMakeLists.txt
@@ -1,15 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(initial_pose_button_panel)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-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(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
@@ -25,11 +18,6 @@ target_link_libraries(initial_pose_button_panel
# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)
-if(BUILD_TESTING)
-find_package(ament_lint_auto REQUIRED)
-ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
plugins
diff --git a/localization/localization_error_monitor/CMakeLists.txt b/localization/localization_error_monitor/CMakeLists.txt
index 1fecce9947e05..17b76573266a1 100644
--- a/localization/localization_error_monitor/CMakeLists.txt
+++ b/localization/localization_error_monitor/CMakeLists.txt
@@ -1,23 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(localization_error_monitor)
-### 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
-## Add executables
ament_auto_add_executable(localization_error_monitor
src/main.cpp
src/node.cpp
@@ -30,11 +16,6 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/localization/ndt/CMakeLists.txt b/localization/ndt/CMakeLists.txt
index e7542aee07cfb..140c439c092e1 100644
--- a/localization/ndt/CMakeLists.txt
+++ b/localization/ndt/CMakeLists.txt
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(ndt)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
+
# Compile flags for SIMD instructions
# Be careful to change these options, especially when `ndt_omp` implementation is used.
# All packages linked to `ndt_omp` should use the same SIMD instruction set.
@@ -19,19 +22,7 @@ else()
endif()
endif()
-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 REQUIRED)
find_package(PCL REQUIRED COMPONENTS common io registration)
-find_package(ndt_omp REQUIRED)
-find_package(ndt_pcl_modified REQUIRED)
add_library(ndt
src/base.cpp
@@ -75,9 +66,4 @@ install(
RUNTIME DESTINATION bin
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_package()
diff --git a/localization/ndt_pcl_modified/CMakeLists.txt b/localization/ndt_pcl_modified/CMakeLists.txt
index 47605e0cace66..f90d2fb0b83d9 100644
--- a/localization/ndt_pcl_modified/CMakeLists.txt
+++ b/localization/ndt_pcl_modified/CMakeLists.txt
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(ndt_pcl_modified)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
+
# Compile flags for SIMD instructions
# Be careful to change these options, especially when `ndt_omp` implementation is used.
# All packages linked to `ndt_omp` should use the same SIMD instruction set.
@@ -19,16 +22,6 @@ else()
endif()
endif()
-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 REQUIRED)
find_package(PCL REQUIRED COMPONENTS common)
add_library(ndt_pcl_modified
@@ -64,9 +57,4 @@ install(
INCLUDES DESTINATION include
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_package()
diff --git a/localization/ndt_scan_matcher/CMakeLists.txt b/localization/ndt_scan_matcher/CMakeLists.txt
index 090304df8a5a5..b23b656b3497c 100644
--- a/localization/ndt_scan_matcher/CMakeLists.txt
+++ b/localization/ndt_scan_matcher/CMakeLists.txt
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(ndt_scan_matcher)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
+
# Compile flags for SIMD instructions
# Be careful to change these options, especially when `ndt_omp` implementation is used.
# All packages linked to `ndt_omp` should use the same SIMD instruction set.
@@ -19,19 +22,6 @@ else()
endif()
endif()
-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()
-
ament_auto_add_executable(ndt_scan_matcher
src/debug.cpp
src/ndt_scan_matcher_node.cpp
@@ -46,11 +36,6 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/localization/pose2twist/CMakeLists.txt b/localization/pose2twist/CMakeLists.txt
index ba24100ca17f4..3a1d98d882dde 100644
--- a/localization/pose2twist/CMakeLists.txt
+++ b/localization/pose2twist/CMakeLists.txt
@@ -1,14 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(pose2twist)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
- set(CMAKE_CXX_EXTENSIONS OFF)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_executable(pose2twist
src/pose2twist_node.cpp
@@ -22,11 +16,6 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/localization/pose_initializer/CMakeLists.txt b/localization/pose_initializer/CMakeLists.txt
index cd0de24582843..ec324acef263a 100644
--- a/localization/pose_initializer/CMakeLists.txt
+++ b/localization/pose_initializer/CMakeLists.txt
@@ -1,20 +1,10 @@
cmake_minimum_required(VERSION 3.5)
project(pose_initializer)
-### 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()
-### Dependencies
-find_package(ament_cmake_auto REQUIRED)
find_package(PCL REQUIRED)
-ament_auto_find_build_dependencies()
ament_auto_add_executable(pose_initializer
src/pose_initializer_node.cpp
@@ -29,11 +19,6 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
config
diff --git a/localization/stop_filter/CMakeLists.txt b/localization/stop_filter/CMakeLists.txt
index 6eb7a5085b6f6..d898f8e830b81 100644
--- a/localization/stop_filter/CMakeLists.txt
+++ b/localization/stop_filter/CMakeLists.txt
@@ -1,20 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(stop_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)
- add_compile_options(-Wno-unused-parameter)
-endif()
-
-# find dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_executable(stop_filter
src/stop_filter_node.cpp
@@ -22,11 +10,6 @@ ament_auto_add_executable(stop_filter
)
ament_target_dependencies(stop_filter)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/localization/vehicle_velocity_converter/CMakeLists.txt b/localization/vehicle_velocity_converter/CMakeLists.txt
index b63c8f42be84a..fdc13d19abf80 100644
--- a/localization/vehicle_velocity_converter/CMakeLists.txt
+++ b/localization/vehicle_velocity_converter/CMakeLists.txt
@@ -1,19 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(vehicle_velocity_converter)
-### 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 dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_executable(vehicle_velocity_converter
src/vehicle_velocity_converter_node.cpp
@@ -21,11 +10,6 @@ ament_auto_add_executable(vehicle_velocity_converter
)
ament_target_dependencies(vehicle_velocity_converter)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/map/lanelet2_extension/CMakeLists.txt b/map/lanelet2_extension/CMakeLists.txt
index a59b95ba2e3c8..999f181ab03c4 100644
--- a/map/lanelet2_extension/CMakeLists.txt
+++ b/map/lanelet2_extension/CMakeLists.txt
@@ -1,18 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(lanelet2_extension)
-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(PkgConfig)
find_path(GeographicLib_INCLUDE_DIR GeographicLib/Config.h
@@ -79,7 +69,6 @@ target_link_libraries(autoware_lanelet2_validation
)
if(BUILD_TESTING)
- find_package(ament_cmake_gtest REQUIRED)
ament_add_gtest(message_conversion-test test/src/test_message_conversion.cpp)
target_link_libraries(message_conversion-test lanelet2_extension_lib)
ament_add_gtest(projector-test test/src/test_projector.cpp)
@@ -90,8 +79,6 @@ if(BUILD_TESTING)
target_link_libraries(regulatory_elements-test lanelet2_extension_lib)
ament_add_gtest(utilities-test test/src/test_utilities.cpp)
target_link_libraries(utilities-test lanelet2_extension_lib)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
endif()
ament_auto_package()
diff --git a/map/map_loader/CMakeLists.txt b/map/map_loader/CMakeLists.txt
index f48ced30d275c..2aed764c8e66e 100644
--- a/map/map_loader/CMakeLists.txt
+++ b/map/map_loader/CMakeLists.txt
@@ -1,21 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(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 -Werror)
-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(pointcloud_map_loader_node SHARED
src/pointcloud_map_loader/pointcloud_map_loader_node.cpp
)
@@ -54,11 +44,6 @@ install(PROGRAMS
DESTINATION lib/${PROJECT_NAME}
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
config
diff --git a/map/map_tf_generator/CMakeLists.txt b/map/map_tf_generator/CMakeLists.txt
index bdaa26b4a6984..cccf1bc403a1d 100644
--- a/map/map_tf_generator/CMakeLists.txt
+++ b/map/map_tf_generator/CMakeLists.txt
@@ -1,24 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(map_tf_generator)
-### 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()
-### ROS Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-### non-ROS Dependencies
find_package(PCL REQUIRED)
-# Generate exe file
ament_auto_add_library(map_tf_generator_node SHARED
src/map_tf_generator_node.cpp
)
@@ -29,12 +16,6 @@ rclcpp_components_register_node(map_tf_generator_node
EXECUTABLE map_tf_generator
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
-## Install
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/map/util/lanelet2_map_preprocessor/CMakeLists.txt b/map/util/lanelet2_map_preprocessor/CMakeLists.txt
index 0319b17f625a5..6c4bde6c5ca4c 100644
--- a/map/util/lanelet2_map_preprocessor/CMakeLists.txt
+++ b/map/util/lanelet2_map_preprocessor/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(lanelet2_map_preprocessor)
-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 -Werror)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
include_directories(
include
diff --git a/perception/compare_map_segmentation/CMakeLists.txt b/perception/compare_map_segmentation/CMakeLists.txt
index c2983c01f236a..ca77670979850 100644
--- a/perception/compare_map_segmentation/CMakeLists.txt
+++ b/perception/compare_map_segmentation/CMakeLists.txt
@@ -1,34 +1,15 @@
cmake_minimum_required(VERSION 3.5)
project(compare_map_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
@@ -87,12 +68,6 @@ rclcpp_components_register_node(compare_map_segmentation
PLUGIN "compare_map_segmentation::CompareElevationMapFilterComponent"
EXECUTABLE compare_elevation_map_filter_node)
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/perception/detected_object_feature_remover/CMakeLists.txt b/perception/detected_object_feature_remover/CMakeLists.txt
index bcb9165ed5b6d..c4f7c8eba760e 100644
--- a/perception/detected_object_feature_remover/CMakeLists.txt
+++ b/perception/detected_object_feature_remover/CMakeLists.txt
@@ -1,21 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(detected_object_feature_remover)
-### 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()
-### Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-# Generate exe file
ament_auto_add_library(detected_object_feature_remover_node SHARED
src/detected_object_feature_remover.cpp
)
diff --git a/perception/detected_object_validation/CMakeLists.txt b/perception/detected_object_validation/CMakeLists.txt
index e2db5edeb9a3c..13135a39f5fab 100644
--- a/perception/detected_object_validation/CMakeLists.txt
+++ b/perception/detected_object_validation/CMakeLists.txt
@@ -1,23 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(detected_object_validation)
-### Compile options
-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 -Werror)
-endif()
-
-# Ignore -Wnonportable-include-path in Clang for mussp
-if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- add_compile_options(-Wno-nonportable-include-path)
-endif()
-
-### Find Packages
-find_package(ament_cmake_auto REQUIRED)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
### Find OpenCV Dependencies
find_package(OpenCV REQUIRED)
@@ -29,9 +14,6 @@ find_package(PCL REQUIRED QUIET COMPONENTS common search filters segmentation)
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
-### Find dependencies listed in the package.xml
-ament_auto_find_build_dependencies()
-
include_directories(
include
SYSTEM
@@ -81,11 +63,6 @@ rclcpp_components_register_node(obstacle_pointcloud_based_validator
EXECUTABLE obstacle_pointcloud_based_validator_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/perception/detection_by_tracker/CMakeLists.txt b/perception/detection_by_tracker/CMakeLists.txt
index 37478b5aa8d6b..da4e67d8e8b24 100644
--- a/perception/detection_by_tracker/CMakeLists.txt
+++ b/perception/detection_by_tracker/CMakeLists.txt
@@ -1,24 +1,14 @@
cmake_minimum_required(VERSION 3.5)
project(detection_by_tracker)
-### Compile options
-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 -Werror)
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
# Ignore -Wnonportable-include-path in Clang for mussp
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-nonportable-include-path)
endif()
-### Find Packages
-find_package(ament_cmake_auto REQUIRED)
-
### Find PCL Dependencies
find_package(PCL REQUIRED)
@@ -26,9 +16,6 @@ find_package(PCL REQUIRED)
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
-### Find dependencies listed in the package.xml
-ament_auto_find_build_dependencies()
-
include_directories(
include
SYSTEM
@@ -63,11 +50,6 @@ rclcpp_components_register_node(detection_by_tracker_node
EXECUTABLE detection_by_tracker
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/perception/elevation_map_loader/CMakeLists.txt b/perception/elevation_map_loader/CMakeLists.txt
index 8f5faa9a38513..ab2c1dcc20e1d 100644
--- a/perception/elevation_map_loader/CMakeLists.txt
+++ b/perception/elevation_map_loader/CMakeLists.txt
@@ -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 -Werror)
-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
)
@@ -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
diff --git a/perception/euclidean_cluster/CMakeLists.txt b/perception/euclidean_cluster/CMakeLists.txt
index 99cc683cc3815..d89921b12e2c1 100644
--- a/perception/euclidean_cluster/CMakeLists.txt
+++ b/perception/euclidean_cluster/CMakeLists.txt
@@ -1,17 +1,10 @@
cmake_minimum_required(VERSION 3.5)
project(euclidean_cluster)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-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)
find_package(PCL REQUIRED)
-ament_auto_find_build_dependencies()
-
include_directories(
include
diff --git a/perception/ground_segmentation/CMakeLists.txt b/perception/ground_segmentation/CMakeLists.txt
index 5326fd95b82b4..6cbdd9a75f844 100644
--- a/perception/ground_segmentation/CMakeLists.txt
+++ b/perception/ground_segmentation/CMakeLists.txt
@@ -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
@@ -82,15 +63,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
)
diff --git a/perception/image_projection_based_fusion/CMakeLists.txt b/perception/image_projection_based_fusion/CMakeLists.txt
index 06703aa8d08d9..00592a798fd40 100644
--- a/perception/image_projection_based_fusion/CMakeLists.txt
+++ b/perception/image_projection_based_fusion/CMakeLists.txt
@@ -1,21 +1,12 @@
cmake_minimum_required(VERSION 3.8)
project(image_projection_based_fusion)
-if (NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-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 dependencies
-find_package(ament_lint_auto REQUIRED)
-find_package(ament_cmake_auto REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
-ament_auto_find_build_dependencies()
-
include_directories(
include
${OpenCV_INCLUDE_DIRS}
@@ -52,10 +43,6 @@ rclcpp_components_register_node(${PROJECT_NAME}
EXECUTABLE roi_detected_object_fusion_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/perception/lidar_apollo_instance_segmentation/CMakeLists.txt b/perception/lidar_apollo_instance_segmentation/CMakeLists.txt
index 0354ea649a3a6..7a3d5aba5ed1c 100644
--- a/perception/lidar_apollo_instance_segmentation/CMakeLists.txt
+++ b/perception/lidar_apollo_instance_segmentation/CMakeLists.txt
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(lidar_apollo_instance_segmentation)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
+
# TODO: remove (https://github.com/autowarefoundation/autoware.universe/issues/850)
add_compile_options(-Wno-deprecated-declarations)
@@ -93,19 +96,8 @@ if(TRT_AVAIL AND CUDA_AVAIL AND CUDNN_AVAIL)
execute_process(COMMAND gdown "https://drive.google.com/uc?id=1izpNotNxS6mrYIzJwHQ_EyX_IPDU-MBr" -O ${PATH}/vls-128.caffemodel)
endif()
- find_package(ament_cmake_auto REQUIRED)
- ament_auto_find_build_dependencies()
find_package(PCL REQUIRED)
- 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 -Wno-deprecated-declarations -Werror)
- endif()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_MWAITXINTRIN_H_INCLUDED")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STRICT_ANSI__")
@@ -156,11 +148,6 @@ if(TRT_AVAIL AND CUDA_AVAIL AND CUDNN_AVAIL)
EXECUTABLE lidar_apollo_instance_segmentation_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
config
@@ -168,14 +155,6 @@ endif()
)
else()
- find_package(ament_cmake_auto REQUIRED)
- ament_auto_find_build_dependencies()
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
# to avoid launch file missing without a gpu
ament_auto_package(INSTALL_TO_SHARE
launch
diff --git a/perception/lidar_centerpoint/CMakeLists.txt b/perception/lidar_centerpoint/CMakeLists.txt
index 782eaf12989f1..1f0e86c25e378 100644
--- a/perception/lidar_centerpoint/CMakeLists.txt
+++ b/perception/lidar_centerpoint/CMakeLists.txt
@@ -1,14 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(lidar_centerpoint)
-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()
# TODO: remove (https://github.com/autowarefoundation/autoware.universe/issues/850)
add_compile_options(-Wno-deprecated-declarations -Wno-unknown-pragmas)
@@ -178,11 +172,6 @@ if(TRT_AVAIL AND CUDA_AVAIL AND CUDNN_AVAIL)
EXECUTABLE lidar_centerpoint_node
)
- if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
- endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
@@ -193,10 +182,6 @@ else()
find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
- if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
- endif()
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/perception/map_based_prediction/CMakeLists.txt b/perception/map_based_prediction/CMakeLists.txt
index 22ea05cae0f68..387718b7cc200 100644
--- a/perception/map_based_prediction/CMakeLists.txt
+++ b/perception/map_based_prediction/CMakeLists.txt
@@ -1,18 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(map_based_prediction)
-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)
@@ -34,11 +24,6 @@ rclcpp_components_register_node(map_based_prediction_node
EXECUTABLE map_based_prediction
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
config
diff --git a/perception/multi_object_tracker/CMakeLists.txt b/perception/multi_object_tracker/CMakeLists.txt
index b03285d290d73..2402f68c49ae4 100644
--- a/perception/multi_object_tracker/CMakeLists.txt
+++ b/perception/multi_object_tracker/CMakeLists.txt
@@ -1,31 +1,18 @@
cmake_minimum_required(VERSION 3.5)
project(multi_object_tracker)
-### 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 -Wnonportable-include-path in Clang for mussp
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-nonportable-include-path)
endif()
-### Find Packages
-find_package(ament_cmake_auto REQUIRED)
-
### Find Eigen Dependencies
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
-### Find dependencies listed in the package.xml
-ament_auto_find_build_dependencies()
-
# Generate exe file
set(MULTI_OBJECT_TRACKER_SRC
src/multi_object_tracker_core.cpp
@@ -67,11 +54,6 @@ rclcpp_components_register_node(multi_object_tracker_node
EXECUTABLE multi_object_tracker
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
config
diff --git a/perception/object_merger/CMakeLists.txt b/perception/object_merger/CMakeLists.txt
index e8b1b78d3e071..508c567f1aabe 100644
--- a/perception/object_merger/CMakeLists.txt
+++ b/perception/object_merger/CMakeLists.txt
@@ -1,23 +1,10 @@
cmake_minimum_required(VERSION 3.5)
project(object_merger)
-find_package(PCL REQUIRED COMPONENTS common filters)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-### 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()
-include_directories(
- include
-)
+find_package(PCL REQUIRED COMPONENTS common filters)
ament_auto_add_library(object_association_merger SHARED
src/object_association_merger/utils/utils.cpp
@@ -33,15 +20,6 @@ rclcpp_components_register_node(object_association_merger
EXECUTABLE object_association_merger_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
)
diff --git a/perception/object_range_splitter/CMakeLists.txt b/perception/object_range_splitter/CMakeLists.txt
index 8f7f5fd4f33c5..fe7a0429d54e9 100644
--- a/perception/object_range_splitter/CMakeLists.txt
+++ b/perception/object_range_splitter/CMakeLists.txt
@@ -1,23 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(object_range_splitter)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-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()
-
-###########
-## Build ##
-###########
-
-include_directories(
- include
-)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_library(object_range_splitter SHARED
src/node.cpp
@@ -28,15 +13,6 @@ rclcpp_components_register_node(object_range_splitter
EXECUTABLE object_range_splitter_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
diff --git a/perception/occupancy_grid_map_outlier_filter/CMakeLists.txt b/perception/occupancy_grid_map_outlier_filter/CMakeLists.txt
index aa2260f483247..f42c771eb39bc 100644
--- a/perception/occupancy_grid_map_outlier_filter/CMakeLists.txt
+++ b/perception/occupancy_grid_map_outlier_filter/CMakeLists.txt
@@ -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()
-
-# 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(autoware_cmake REQUIRED)
+autoware_package()
-find_package(ament_cmake_auto REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(Boost REQUIRED)
@@ -25,11 +12,6 @@ find_package(pcl_conversions REQUIRED)
find_package(OpenMP)
ament_auto_find_build_dependencies()
-
-###########
-## Build ##
-###########
-
include_directories(
include
SYSTEM
@@ -64,20 +46,9 @@ if(OPENMP_FOUND)
)
endif()
-
# -- Occupancy Grid Map Outlier Filter --
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)
diff --git a/perception/shape_estimation/CMakeLists.txt b/perception/shape_estimation/CMakeLists.txt
index 2880e999dc6fe..3a2a7a536f2e8 100644
--- a/perception/shape_estimation/CMakeLists.txt
+++ b/perception/shape_estimation/CMakeLists.txt
@@ -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)
@@ -80,11 +71,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
)
diff --git a/perception/tensorrt_yolo/CMakeLists.txt b/perception/tensorrt_yolo/CMakeLists.txt
index 96c0700332cf1..0653b7a37ae16 100755
--- a/perception/tensorrt_yolo/CMakeLists.txt
+++ b/perception/tensorrt_yolo/CMakeLists.txt
@@ -1,23 +1,14 @@
cmake_minimum_required(VERSION 3.5)
project(tensorrt_yolo)
-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 -Wno-deprecated-declarations -Werror)
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
# TODO: remove (https://github.com/autowarefoundation/autoware.universe/issues/850)
add_compile_options(-Wno-deprecated-declarations)
option(CUDA_VERBOSE "Verbose output of CUDA modules" OFF)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
find_package(OpenCV REQUIRED)
# set flags for CUDA availability
@@ -243,11 +234,6 @@ if(TRT_AVAIL AND CUDA_AVAIL AND CUDNN_AVAIL)
EXECUTABLE tensorrt_yolo_node
)
- if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
- endif()
-
ament_auto_package(INSTALL_TO_SHARE
config
data
diff --git a/perception/traffic_light_classifier/CMakeLists.txt b/perception/traffic_light_classifier/CMakeLists.txt
index 76cb89264d702..8ebb28e55a097 100644
--- a/perception/traffic_light_classifier/CMakeLists.txt
+++ b/perception/traffic_light_classifier/CMakeLists.txt
@@ -1,12 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(traffic_light_classifier)
-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 -Wno-deprecated-declarations -Werror)
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
# TODO: remove (https://github.com/autowarefoundation/autoware.universe/issues/850)
add_compile_options(-Wno-deprecated-declarations)
diff --git a/perception/traffic_light_map_based_detector/CMakeLists.txt b/perception/traffic_light_map_based_detector/CMakeLists.txt
index 7dbddc4ebc63b..4660a40fb1aab 100644
--- a/perception/traffic_light_map_based_detector/CMakeLists.txt
+++ b/perception/traffic_light_map_based_detector/CMakeLists.txt
@@ -1,24 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(traffic_light_map_based_detector)
-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)
-###########
-## Build ##
-###########
-
include_directories(
${EIGEN3_INCLUDE_DIR}
)
@@ -39,15 +26,6 @@ rclcpp_components_register_node(traffic_light_map_based_detector
EXECUTABLE traffic_light_map_based_detector_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
config
diff --git a/perception/traffic_light_ssd_fine_detector/CMakeLists.txt b/perception/traffic_light_ssd_fine_detector/CMakeLists.txt
index fdffc78737186..e6377b97fab0e 100644
--- a/perception/traffic_light_ssd_fine_detector/CMakeLists.txt
+++ b/perception/traffic_light_ssd_fine_detector/CMakeLists.txt
@@ -1,24 +1,14 @@
cmake_minimum_required(VERSION 3.5)
-
-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 -Werror)
-endif()
-
project(traffic_light_ssd_fine_detector)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
+
# TODO: remove (https://github.com/autowarefoundation/autoware.universe/issues/850)
add_compile_options(-Wno-deprecated-declarations)
option(CUDA_VERBOSE "Verbose output of CUDA modules" OFF)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
find_package(OpenCV REQUIRED)
# set flags for CUDA availability
diff --git a/perception/traffic_light_visualization/CMakeLists.txt b/perception/traffic_light_visualization/CMakeLists.txt
index 38674fabe20ba..2c6862095d88b 100644
--- a/perception/traffic_light_visualization/CMakeLists.txt
+++ b/perception/traffic_light_visualization/CMakeLists.txt
@@ -1,22 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(traffic_light_visualization)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
-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(OpenCV REQUIRED)
-###########
-## Build ##
-###########
-
ament_auto_add_library(traffic_light_roi_visualizer_nodelet SHARED
src/traffic_light_roi_visualizer/nodelet.cpp
)
@@ -30,20 +19,11 @@ rclcpp_components_register_node(traffic_light_roi_visualizer_nodelet
EXECUTABLE traffic_light_visualization_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_add_executable(traffic_light_map_visualizer_node
src/traffic_light_map_visualizer/node.cpp
src/traffic_light_map_visualizer/main.cpp
)
-#############
-## Install ##
-#############
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/planning/behavior_path_planner/CMakeLists.txt b/planning/behavior_path_planner/CMakeLists.txt
index 40585a7effdca..8832c860df8ed 100644
--- a/planning/behavior_path_planner/CMakeLists.txt
+++ b/planning/behavior_path_planner/CMakeLists.txt
@@ -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
@@ -56,11 +48,6 @@ rclcpp_components_register_node(behavior_path_planner_node
EXECUTABLE behavior_path_planner
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
config
diff --git a/planning/behavior_velocity_planner/CMakeLists.txt b/planning/behavior_velocity_planner/CMakeLists.txt
index f73f643ee6ef7..3bff8ff9451af 100644
--- a/planning/behavior_velocity_planner/CMakeLists.txt
+++ b/planning/behavior_velocity_planner/CMakeLists.txt
@@ -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
@@ -400,9 +389,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
src/utilization/util.cpp
@@ -447,7 +433,6 @@ if(BUILD_TESTING)
USE_TF2_GEOMETRY_MSGS_DEPRECATED_HEADER
)
endif()
-
endif()
ament_auto_package(INSTALL_TO_SHARE
diff --git a/planning/costmap_generator/CMakeLists.txt b/planning/costmap_generator/CMakeLists.txt
index b1375b3b1f30d..27b6b971897dc 100644
--- a/planning/costmap_generator/CMakeLists.txt
+++ b/planning/costmap_generator/CMakeLists.txt
@@ -1,20 +1,11 @@
cmake_minimum_required(VERSION 3.5)
-
project(costmap_generator)
-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_auto REQUIRED)
find_package(PCL REQUIRED COMPONENTS common io)
find_package(FLANN REQUIRED)
-ament_auto_find_build_dependencies()
include_directories(
include
@@ -70,8 +61,6 @@ rclcpp_components_register_node(costmap_generator_node
if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
endif()
ament_auto_package(INSTALL_TO_SHARE launch)
diff --git a/planning/external_velocity_limit_selector/CMakeLists.txt b/planning/external_velocity_limit_selector/CMakeLists.txt
index 58cf571a6fc1a..ec5b0293bf887 100644
--- a/planning/external_velocity_limit_selector/CMakeLists.txt
+++ b/planning/external_velocity_limit_selector/CMakeLists.txt
@@ -1,30 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(external_velocity_limit_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()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
-## Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-# Target
-
-## Target executable
-set(EXTERNAL_VELOCITY_LIMIT_SELECTOR_SRC
- src/external_velocity_limit_selector_node.cpp
-)
-
-## external_velocity_limit_selector_node
ament_auto_add_library(external_velocity_limit_selector_node SHARED
- ${EXTERNAL_VELOCITY_LIMIT_SELECTOR_SRC}
+ src/external_velocity_limit_selector_node.cpp
)
rclcpp_components_register_node(external_velocity_limit_selector_node
@@ -32,11 +13,6 @@ rclcpp_components_register_node(external_velocity_limit_selector_node
EXECUTABLE external_velocity_limit_selector
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
config
diff --git a/planning/freespace_planner/CMakeLists.txt b/planning/freespace_planner/CMakeLists.txt
index 42750739010e8..c81de25a7c4db 100644
--- a/planning/freespace_planner/CMakeLists.txt
+++ b/planning/freespace_planner/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(freespace_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()
ament_auto_add_library(freespace_planner_node SHARED
src/freespace_planner/freespace_planner_node.cpp
@@ -29,11 +20,6 @@ rclcpp_components_register_node(freespace_planner_node
EXECUTABLE freespace_planner
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/planning/freespace_planning_algorithms/CMakeLists.txt b/planning/freespace_planning_algorithms/CMakeLists.txt
index b3fcf283bf5b4..3b9544532e067 100644
--- a/planning/freespace_planning_algorithms/CMakeLists.txt
+++ b/planning/freespace_planning_algorithms/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(freespace_planning_algorithms)
-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(reeds_shepp SHARED
src/reeds_shepp.cpp
@@ -34,9 +25,6 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
endif()
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
find_package(ament_cmake_gtest REQUIRED)
ament_add_gtest(freespace_planning_algorithms-test
test/src/test_freespace_planning_algorithms.cpp
diff --git a/planning/mission_planner/CMakeLists.txt b/planning/mission_planner/CMakeLists.txt
index 3cda858f537ae..f435d48e3b874 100644
--- a/planning/mission_planner/CMakeLists.txt
+++ b/planning/mission_planner/CMakeLists.txt
@@ -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
@@ -41,11 +31,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
)
diff --git a/planning/motion_velocity_smoother/CMakeLists.txt b/planning/motion_velocity_smoother/CMakeLists.txt
index 4dd75852c71d5..d855ea1a09a93 100644
--- a/planning/motion_velocity_smoother/CMakeLists.txt
+++ b/planning/motion_velocity_smoother/CMakeLists.txt
@@ -1,23 +1,13 @@
cmake_minimum_required(VERSION 3.5)
project(motion_velocity_smoother)
-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()
find_package(Boost REQUIRED)
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
-
set(MOTION_VELOCITY_SMOOTHER_SRC
src/motion_velocity_smoother_node.cpp
src/trajectory_utils.cpp
@@ -58,11 +48,6 @@ rclcpp_components_register_node(motion_velocity_smoother_node
EXECUTABLE motion_velocity_smoother
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/planning/obstacle_avoidance_planner/CMakeLists.txt b/planning/obstacle_avoidance_planner/CMakeLists.txt
index 3e2858a4c08fb..a6bdd49b1d1ef 100644
--- a/planning/obstacle_avoidance_planner/CMakeLists.txt
+++ b/planning/obstacle_avoidance_planner/CMakeLists.txt
@@ -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)
@@ -50,11 +41,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
diff --git a/planning/obstacle_stop_planner/CMakeLists.txt b/planning/obstacle_stop_planner/CMakeLists.txt
index 26b2bc308d4bf..6938f414f92d8 100644
--- a/planning/obstacle_stop_planner/CMakeLists.txt
+++ b/planning/obstacle_stop_planner/CMakeLists.txt
@@ -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)
@@ -46,11 +37,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
diff --git a/planning/planning_error_monitor/CMakeLists.txt b/planning/planning_error_monitor/CMakeLists.txt
index e1bcc4dae15c6..31081701780f5 100644
--- a/planning/planning_error_monitor/CMakeLists.txt
+++ b/planning/planning_error_monitor/CMakeLists.txt
@@ -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
@@ -39,8 +30,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
diff --git a/planning/planning_evaluator/CMakeLists.txt b/planning/planning_evaluator/CMakeLists.txt
index 400a2bbfc726e..8e6b975d13644 100644
--- a/planning/planning_evaluator/CMakeLists.txt
+++ b/planning/planning_evaluator/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(planning_evaluator)
-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(${PROJECT_NAME}_node SHARED
src/metrics_calculator.cpp
@@ -42,8 +33,6 @@ rclcpp_components_register_node(${PROJECT_NAME}_node
)
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
ament_add_gtest(test_${PROJECT_NAME}
test/test_planning_evaluator_node.cpp
)
diff --git a/planning/route_handler/CMakeLists.txt b/planning/route_handler/CMakeLists.txt
index 9337c272d85d1..fbbc22d0d946c 100644
--- a/planning/route_handler/CMakeLists.txt
+++ b/planning/route_handler/CMakeLists.txt
@@ -1,16 +1,8 @@
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
@@ -23,10 +15,4 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-# Test
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package()
diff --git a/planning/scenario_selector/CMakeLists.txt b/planning/scenario_selector/CMakeLists.txt
index 443cbf7faf4e4..3bce9ef0504da 100644
--- a/planning/scenario_selector/CMakeLists.txt
+++ b/planning/scenario_selector/CMakeLists.txt
@@ -1,30 +1,11 @@
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()
-
-# Target
-
-## Target executable
-set(SCENARIO_SELECTOR_SRC
- src/scenario_selector_node/scenario_selector_node.cpp
-)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
-## scenario_selector_node
ament_auto_add_library(scenario_selector_node SHARED
- ${SCENARIO_SELECTOR_SRC}
+ src/scenario_selector_node/scenario_selector_node.cpp
)
# workaround to allow deprecated header to build on both galactic and rolling
@@ -39,11 +20,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
)
diff --git a/planning/surround_obstacle_checker/CMakeLists.txt b/planning/surround_obstacle_checker/CMakeLists.txt
index 4f223c4db4a36..8216fd5c0a4a6 100644
--- a/planning/surround_obstacle_checker/CMakeLists.txt
+++ b/planning/surround_obstacle_checker/CMakeLists.txt
@@ -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
@@ -39,11 +29,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
diff --git a/sensing/geo_pos_conv/CMakeLists.txt b/sensing/geo_pos_conv/CMakeLists.txt
index 501218f7f3e7a..38d9e83e1fe3d 100644
--- a/sensing/geo_pos_conv/CMakeLists.txt
+++ b/sensing/geo_pos_conv/CMakeLists.txt
@@ -1,28 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(geo_pos_conv)
-### 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()
-### Add dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-### Create library
ament_auto_add_library(geo_pos_conv SHARED
src/geo_pos_conv.cpp
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package()
diff --git a/sensing/gnss_poser/CMakeLists.txt b/sensing/gnss_poser/CMakeLists.txt
index 6f94465632dda..20ee8a3423b40 100644
--- a/sensing/gnss_poser/CMakeLists.txt
+++ b/sensing/gnss_poser/CMakeLists.txt
@@ -1,15 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(gnss_poser)
-### 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 non-ROS library
find_package(PkgConfig)
@@ -22,9 +15,6 @@ find_library(GeographicLib_LIBRARIES
NAMES Geographic
)
-find_package(ament_cmake_auto)
-ament_auto_find_build_dependencies()
-
set(GNSS_POSER_HEADERS
include/gnss_poser/convert.hpp
include/gnss_poser/gnss_poser_core.hpp
@@ -52,11 +42,6 @@ rclcpp_components_register_node(gnss_poser_node
EXECUTABLE gnss_poser
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/sensing/image_transport_decompressor/CMakeLists.txt b/sensing/image_transport_decompressor/CMakeLists.txt
index d6ce92e911f32..3d5b155aca479 100644
--- a/sensing/image_transport_decompressor/CMakeLists.txt
+++ b/sensing/image_transport_decompressor/CMakeLists.txt
@@ -1,22 +1,10 @@
cmake_minimum_required(VERSION 3.5)
project(image_transport_decompressor)
-### 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)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
find_package(OpenCV REQUIRED)
-
include_directories(
${OpenCV_INCLUDE_DIRS}
)
@@ -34,11 +22,6 @@ rclcpp_components_register_node(image_transport_decompressor
EXECUTABLE image_transport_decompressor_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/sensing/imu_corrector/CMakeLists.txt b/sensing/imu_corrector/CMakeLists.txt
index 903a6bcab07c5..707497cb692f7 100644
--- a/sensing/imu_corrector/CMakeLists.txt
+++ b/sensing/imu_corrector/CMakeLists.txt
@@ -1,18 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(imu_corrector)
-### 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(imu_corrector_node SHARED
src/imu_corrector_core.cpp
@@ -24,11 +14,6 @@ rclcpp_components_register_node(imu_corrector_node
EXECUTABLE imu_corrector
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
config
diff --git a/sensing/livox/livox_tag_filter/CMakeLists.txt b/sensing/livox/livox_tag_filter/CMakeLists.txt
index bb0cf8166e3b3..a2af024b96861 100644
--- a/sensing/livox/livox_tag_filter/CMakeLists.txt
+++ b/sensing/livox/livox_tag_filter/CMakeLists.txt
@@ -1,24 +1,11 @@
cmake_minimum_required(VERSION 3.5)
project(livox_tag_filter)
-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()
find_package(PCL REQUIRED)
-include_directories(${PCL_INCLUDE_DIRS})
-# Target
-## livox_tag_filter_node
ament_auto_add_library(livox_tag_filter SHARED
src/livox_tag_filter_node/livox_tag_filter_node.cpp
)
@@ -32,13 +19,6 @@ rclcpp_components_register_node(livox_tag_filter
EXECUTABLE livox_tag_filter_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
-# Install
-## executables and libraries
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/sensing/pointcloud_preprocessor/CMakeLists.txt b/sensing/pointcloud_preprocessor/CMakeLists.txt
index 2d2dc632fcf79..0c59f3094997a 100644
--- a/sensing/pointcloud_preprocessor/CMakeLists.txt
+++ b/sensing/pointcloud_preprocessor/CMakeLists.txt
@@ -1,34 +1,14 @@
cmake_minimum_required(VERSION 3.5)
project(pointcloud_preprocessor)
-### 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
@@ -162,15 +142,6 @@ rclcpp_components_register_node(pointcloud_preprocessor_filter
PLUGIN "pointcloud_preprocessor::BlockageDiagComponent"
EXECUTABLE blockage_diag_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
)
diff --git a/sensing/probabilistic_occupancy_grid_map/CMakeLists.txt b/sensing/probabilistic_occupancy_grid_map/CMakeLists.txt
index 7c3ce78a04dd8..7641039014076 100644
--- a/sensing/probabilistic_occupancy_grid_map/CMakeLists.txt
+++ b/sensing/probabilistic_occupancy_grid_map/CMakeLists.txt
@@ -1,20 +1,12 @@
cmake_minimum_required(VERSION 3.5)
project(probabilistic_occupancy_grid_map)
-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_auto REQUIRED)
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(PCL REQUIRED)
-ament_auto_find_build_dependencies()
# PointcloudBasedOccupancyGridMap
ament_auto_add_library(pointcloud_based_occupancy_grid_map SHARED
@@ -55,16 +47,6 @@ rclcpp_components_register_node(laserscan_based_occupancy_grid_map
EXECUTABLE laserscan_based_occupancy_grid_map_node
)
-
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- list(APPEND AMENT_LINT_AUTO_EXCLUDE
- # To avoid conflicts between cpplint and uncrustify w.r.t. inclusion guards
- ament_cmake_uncrustify
- )
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
launch
diff --git a/sensing/tier4_pcl_extensions/CMakeLists.txt b/sensing/tier4_pcl_extensions/CMakeLists.txt
index 8eacc49d56d9c..ec2b127d33dcb 100644
--- a/sensing/tier4_pcl_extensions/CMakeLists.txt
+++ b/sensing/tier4_pcl_extensions/CMakeLists.txt
@@ -1,19 +1,10 @@
cmake_minimum_required(VERSION 3.5)
project(tier4_pcl_extensions)
-### 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_package(ament_cmake_auto REQUIRED)
find_package(PCL REQUIRED COMPONENTS common)
-
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
@@ -27,9 +18,4 @@ ament_auto_add_library(tier4_pcl_extensions SHARED
target_link_libraries(tier4_pcl_extensions ${PCL_LIBRARIES})
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package()
diff --git a/simulator/dummy_perception_publisher/CMakeLists.txt b/simulator/dummy_perception_publisher/CMakeLists.txt
index 7a52146afc97f..2d6e99c960afc 100644
--- a/simulator/dummy_perception_publisher/CMakeLists.txt
+++ b/simulator/dummy_perception_publisher/CMakeLists.txt
@@ -1,24 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(dummy_perception_publisher)
-### 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 for messages
-find_package(ament_cmake_auto REQUIRED)
-find_package(rosidl_default_generators REQUIRED)
-find_package(autoware_auto_perception_msgs REQUIRED)
-find_package(tier4_perception_msgs REQUIRED)
-find_package(geometry_msgs REQUIRED)
-find_package(std_msgs REQUIRED)
-find_package(unique_identifier_msgs REQUIRED)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
rosidl_generate_interfaces(${PROJECT_NAME}
"msg/InitialState.msg"
@@ -28,8 +12,6 @@ rosidl_generate_interfaces(${PROJECT_NAME}
# See ndt_omp package for documentation on why PCL is special
find_package(PCL REQUIRED COMPONENTS common filters)
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
set(${PROJECT_NAME}_DEPENDENCIES
autoware_auto_perception_msgs
@@ -99,11 +81,6 @@ ament_auto_add_executable(empty_objects_publisher
)
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
- find_package(ament_cmake_gtest REQUIRED)
-
ament_add_gtest(signed_distance_function-test
test/src/test_signed_distance_function.cpp
)
diff --git a/simulator/fault_injection/CMakeLists.txt b/simulator/fault_injection/CMakeLists.txt
index 89bccb4ecb55c..7b4b2ef56e550 100644
--- a/simulator/fault_injection/CMakeLists.txt
+++ b/simulator/fault_injection/CMakeLists.txt
@@ -4,8 +4,6 @@ project(fault_injection)
find_package(autoware_cmake REQUIRED)
autoware_package()
-
-## Targets
ament_auto_add_library(fault_injection_node_component SHARED
src/fault_injection_node/fault_injection_node.cpp
)
@@ -22,7 +20,6 @@ rclcpp_components_register_node(fault_injection_node_component
EXECUTABLE fault_injection_node
)
-## Tests
if(BUILD_TESTING)
# gtest
ament_add_gtest(test_fault_injection_node_component
@@ -35,7 +32,6 @@ if(BUILD_TESTING)
)
# launch_testing
- find_package(launch_testing_ament_cmake REQUIRED)
add_launch_test(
test/test_fault_injection_node.test.py
TARGET test_fault_injection_launch_test
@@ -54,7 +50,6 @@ if(BUILD_TESTING)
)
endif()
-## Package
ament_auto_package(
INSTALL_TO_SHARE
config
diff --git a/simulator/simple_planning_simulator/CMakeLists.txt b/simulator/simple_planning_simulator/CMakeLists.txt
index c262f13314848..899f8f45896f1 100644
--- a/simulator/simple_planning_simulator/CMakeLists.txt
+++ b/simulator/simple_planning_simulator/CMakeLists.txt
@@ -1,11 +1,8 @@
cmake_minimum_required(VERSION 3.6)
-
project(simple_planning_simulator)
-### Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
+find_package(autoware_cmake REQUIRED)
+autoware_package()
# Component
ament_auto_add_library(${PROJECT_NAME} SHARED
@@ -37,12 +34,7 @@ rclcpp_components_register_node(${PROJECT_NAME}
EXECUTABLE ${PROJECT_NAME}_exe
)
-
-### Test
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
ament_add_gtest(test_simple_planning_simulator
test/test_simple_planning_simulator.cpp
TIMEOUT 120
@@ -60,7 +52,4 @@ if(BUILD_TESTING)
endif()
endif()
-
-
-
ament_auto_package(INSTALL_TO_SHARE param launch)
diff --git a/system/ad_service_state_monitor/CMakeLists.txt b/system/ad_service_state_monitor/CMakeLists.txt
index c68afa92fdf26..9a4cf952c4f39 100644
--- a/system/ad_service_state_monitor/CMakeLists.txt
+++ b/system/ad_service_state_monitor/CMakeLists.txt
@@ -1,34 +1,16 @@
cmake_minimum_required(VERSION 3.5)
project(ad_service_state_monitor)
-### 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()
-
-### Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
-# Target
-## Set source files
-set(AD_SERVICE_STATE_MONITOR_SRC
+ament_auto_add_executable(ad_service_state_monitor
+ src/ad_service_state_monitor_node/main.cpp
src/ad_service_state_monitor_node/ad_service_state_monitor_node.cpp
src/ad_service_state_monitor_node/state_machine.cpp
src/ad_service_state_monitor_node/diagnostics.cpp
)
-## Add executables
-ament_auto_add_executable(ad_service_state_monitor
- src/ad_service_state_monitor_node/main.cpp
- ${AD_SERVICE_STATE_MONITOR_SRC}
-)
-
# workaround to allow deprecated header to build on both galactic and rolling
if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
target_compile_definitions(ad_service_state_monitor PRIVATE
@@ -36,11 +18,6 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
config
diff --git a/system/default_ad_api/CMakeLists.txt b/system/default_ad_api/CMakeLists.txt
index d449f2ffa978c..fd256e1102568 100644
--- a/system/default_ad_api/CMakeLists.txt
+++ b/system/default_ad_api/CMakeLists.txt
@@ -1,18 +1,8 @@
cmake_minimum_required(VERSION 3.8)
project(default_ad_api)
-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 -Werror)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_library(${PROJECT_NAME} SHARED
src/interface_version.cpp
@@ -28,9 +18,6 @@ endif()
rclcpp_components_register_nodes(${PROJECT_NAME} "default_ad_api::InterfaceVersionNode")
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
- find_package(launch_testing_ament_cmake)
add_launch_test(test/main.test.py)
endif()
diff --git a/system/dummy_diag_publisher/CMakeLists.txt b/system/dummy_diag_publisher/CMakeLists.txt
index c2071d53de3cc..aa61b7a937ea8 100644
--- a/system/dummy_diag_publisher/CMakeLists.txt
+++ b/system/dummy_diag_publisher/CMakeLists.txt
@@ -1,19 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(dummy_diag_publisher)
-### 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()
-
-### Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_library(dummy_diag_publisher SHARED
src/dummy_diag_publisher_node/dummy_diag_publisher_node.cpp
@@ -24,11 +13,6 @@ rclcpp_components_register_node(dummy_diag_publisher
EXECUTABLE dummy_diag_publisher_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/system/dummy_infrastructure/CMakeLists.txt b/system/dummy_infrastructure/CMakeLists.txt
index c18bf3ab46cdd..f73fcbc338edd 100644
--- a/system/dummy_infrastructure/CMakeLists.txt
+++ b/system/dummy_infrastructure/CMakeLists.txt
@@ -1,22 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(dummy_infrastructure)
-## Compile options
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 17)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
- set(CMAKE_CXX_EXTENSIONS OFF)
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
-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()
-
-## Targets
ament_auto_add_library(dummy_infrastructure_node_component SHARED
src/dummy_infrastructure_node/dummy_infrastructure_node.cpp
)
@@ -26,13 +13,6 @@ rclcpp_components_register_node(dummy_infrastructure_node_component
EXECUTABLE dummy_infrastructure_node
)
-## Tests
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
-## Package
ament_auto_package(
INSTALL_TO_SHARE
config
diff --git a/system/emergency_handler/CMakeLists.txt b/system/emergency_handler/CMakeLists.txt
index a1daea31bf6ee..3e4eef0914e55 100644
--- a/system/emergency_handler/CMakeLists.txt
+++ b/system/emergency_handler/CMakeLists.txt
@@ -1,38 +1,14 @@
cmake_minimum_required(VERSION 3.5)
project(emergency_handler)
-### Compile options
-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()
-
-### Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-### Target executable
-set(EMERGENCY_HANDLER_SRC
- src/emergency_handler/emergency_handler_core.cpp)
-
-set(EMERGENCY_HANDLER_HEADERS
- include/emergency_handler/emergency_handler_core.hpp)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_executable(emergency_handler
src/emergency_handler/emergency_handler_node.cpp
- ${EMERGENCY_HANDLER_SRC}
- ${EMERGENCY_HANDLER_HEADERS}
+ src/emergency_handler/emergency_handler_core.cpp
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
config
diff --git a/system/system_error_monitor/CMakeLists.txt b/system/system_error_monitor/CMakeLists.txt
index fe824b040382f..ca55617e817b7 100644
--- a/system/system_error_monitor/CMakeLists.txt
+++ b/system/system_error_monitor/CMakeLists.txt
@@ -1,38 +1,14 @@
cmake_minimum_required(VERSION 3.5)
project(system_error_monitor)
-### 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()
-
-# Target
-## system_error_monitor_node
-set(SYSTEM_ERROR_MONITOR_SRC
- src/system_error_monitor_core.cpp
-)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_executable(${PROJECT_NAME}
src/system_error_monitor_node.cpp
- ${SYSTEM_ERROR_MONITOR_SRC}
+ src/system_error_monitor_core.cpp
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
-# Install
-## executables and libraries
ament_auto_package(INSTALL_TO_SHARE
launch
config
diff --git a/system/system_monitor/CMakeLists.txt b/system/system_monitor/CMakeLists.txt
index 1e12fb2b257a2..a41616db7cf6c 100644
--- a/system/system_monitor/CMakeLists.txt
+++ b/system/system_monitor/CMakeLists.txt
@@ -1,18 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(system_monitor)
-## Compile as C++14, supported in ROS Melodic and newer
-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 -Wno-stringop-truncation)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
# TODO: remove (https://github.com/autowarefoundation/autoware.universe/issues/851)
add_compile_options(-Wno-stringop-truncation)
@@ -22,10 +12,6 @@ find_package(NVML)
find_package(fmt REQUIRED)
set(LIBRARIES fmt)
-###########
-## Build ##
-###########
-
## Specify additional locations of header files
find_path(LIBNL3_INCLUDE_DIRS
@@ -194,9 +180,6 @@ rclcpp_components_register_node(gpu_monitor_lib
# TODO(yunus.caliskan): Port the tests to ROS2, robustify the tests.
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
# ament_add_gtest(test_cpu_monitor
# test/src/cpu_monitor/test_${CMAKE_CPU_PLATFORM}_cpu_monitor.cpp
# ${CPU_MONITOR_SOURCE}
@@ -313,10 +296,6 @@ if(BUILD_TESTING)
endif()
-#############
-## Install ##
-#############
-
ament_auto_package(INSTALL_TO_SHARE
launch
config
diff --git a/system/topic_state_monitor/CMakeLists.txt b/system/topic_state_monitor/CMakeLists.txt
index cefc2f00e9d07..7af5f418ed5a6 100644
--- a/system/topic_state_monitor/CMakeLists.txt
+++ b/system/topic_state_monitor/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(topic_state_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 -Werror)
-endif()
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_library(topic_state_monitor SHARED
src/topic_state_monitor/topic_state_monitor.cpp
@@ -23,13 +14,6 @@ rclcpp_components_register_node(topic_state_monitor
EXECUTABLE topic_state_monitor_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
-# Install
-## directories
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/system/velodyne_monitor/CMakeLists.txt b/system/velodyne_monitor/CMakeLists.txt
index a8a037e83e044..bd9cd28bc0bc3 100644
--- a/system/velodyne_monitor/CMakeLists.txt
+++ b/system/velodyne_monitor/CMakeLists.txt
@@ -1,19 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(velodyne_monitor)
-### 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 executable
ament_auto_add_executable(velodyne_monitor
@@ -24,11 +13,6 @@ ament_auto_add_executable(velodyne_monitor
## Specify libraries to link a library or executable target against
target_link_libraries(velodyne_monitor cpprest crypto fmt)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
config
diff --git a/vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/CMakeLists.txt b/vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/CMakeLists.txt
index 1bf8123c82a31..8cbfc626a077a 100644
--- a/vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/CMakeLists.txt
+++ b/vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/CMakeLists.txt
@@ -1,17 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(accel_brake_map_calibrator)
-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()
ament_auto_add_executable(accel_brake_map_calibrator
src/accel_brake_map_calibrator_node.cpp
@@ -26,11 +17,6 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
install(
PROGRAMS
scripts/__init__.py
diff --git a/vehicle/external_cmd_converter/CMakeLists.txt b/vehicle/external_cmd_converter/CMakeLists.txt
index b51f68db9c1de..b823588de265a 100644
--- a/vehicle/external_cmd_converter/CMakeLists.txt
+++ b/vehicle/external_cmd_converter/CMakeLists.txt
@@ -1,18 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(external_cmd_converter)
-### 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(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_library(external_cmd_converter SHARED
src/node.cpp
@@ -23,11 +13,6 @@ rclcpp_components_register_node(external_cmd_converter
EXECUTABLE external_cmd_converter_node
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(INSTALL_TO_SHARE
launch
)
diff --git a/vehicle/raw_vehicle_cmd_converter/CMakeLists.txt b/vehicle/raw_vehicle_cmd_converter/CMakeLists.txt
index 1c9f4a097f8a6..bb4ab068fcfeb 100644
--- a/vehicle/raw_vehicle_cmd_converter/CMakeLists.txt
+++ b/vehicle/raw_vehicle_cmd_converter/CMakeLists.txt
@@ -1,19 +1,8 @@
cmake_minimum_required(VERSION 3.5)
-
project(raw_vehicle_cmd_converter)
-### 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(actuation_map_converter SHARED
src/accel_map.cpp
@@ -35,10 +24,6 @@ rclcpp_components_register_node(raw_vehicle_cmd_converter_node_component
)
if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
- # Unit tests
set(TEST_SOURCES
test/test_raw_vehicle_cmd_converter.cpp
)
diff --git a/vehicle/vehicle_info_util/CMakeLists.txt b/vehicle/vehicle_info_util/CMakeLists.txt
index 4b7f3b80160e4..192a74060f0fa 100644
--- a/vehicle/vehicle_info_util/CMakeLists.txt
+++ b/vehicle/vehicle_info_util/CMakeLists.txt
@@ -1,29 +1,13 @@
cmake_minimum_required(VERSION 3.5)
project(vehicle_info_util)
-### 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(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
+find_package(autoware_cmake REQUIRED)
+autoware_package()
ament_auto_add_library(vehicle_info_util SHARED
src/vehicle_info_util.cpp
)
-if(BUILD_TESTING)
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-endif()
-
ament_auto_package(
INSTALL_TO_SHARE
config