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_ad_api_msgs/package.xml b/common/autoware_ad_api_msgs/package.xml
index 568b665ec0631..db10bd2cdb877 100644
--- a/common/autoware_ad_api_msgs/package.xml
+++ b/common/autoware_ad_api_msgs/package.xml
@@ -9,12 +9,13 @@
ament_cmake_auto
- geometry_msgs
- std_msgs
-
+ autoware_cmake
builtin_interfaces
rosidl_default_generators
+ geometry_msgs
+ std_msgs
+
builtin_interfaces
rosidl_default_runtime
diff --git a/common/autoware_auto_cmake/CMakeLists.txt b/common/autoware_auto_cmake/CMakeLists.txt
deleted file mode 100644
index 39152d2222082..0000000000000
--- a/common/autoware_auto_cmake/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-cmake_minimum_required(VERSION 3.5)
-
-project(autoware_auto_cmake NONE)
-
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-list(APPEND ${PROJECT_NAME}_CONFIG_EXTRAS
- "autoware_auto_cmake-extras.cmake"
-)
-
-if(BUILD_TESTING)
- ament_lint_cmake(${CMAKE_CURRENT_SOURCE_DIR})
-endif()
-
-ament_auto_package(INSTALL_TO_SHARE
- cmake
-)
diff --git a/common/autoware_auto_cmake/autoware_auto_cmake-extras.cmake b/common/autoware_auto_cmake/autoware_auto_cmake-extras.cmake
deleted file mode 100644
index 2d53ccda8293b..0000000000000
--- a/common/autoware_auto_cmake/autoware_auto_cmake-extras.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2018 the Autoware Foundation
-# Co-developed by Tier IV, Inc. and Apex.AI, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-include("${autoware_auto_cmake_DIR}/autoware_auto_cmake.cmake")
diff --git a/common/autoware_auto_cmake/cmake/autoware_auto_cmake.cmake b/common/autoware_auto_cmake/cmake/autoware_auto_cmake.cmake
deleted file mode 100644
index 95d5e08684322..0000000000000
--- a/common/autoware_auto_cmake/cmake/autoware_auto_cmake.cmake
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 2021 the Autoware Foundation
-# Co-developed by Tier IV, Inc. and Apex.AI, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Set language standard with variables instead of per target so even targets that
-# don't use autoware_set_compile_options() have this set when importing
-# autoware_auto_cmake via ament_auto_find_build_dependencies()
-if(NOT CMAKE_C_STANDARD)
- # Default to C11 (rcutils uses C11 thread local storage)
- set(CMAKE_C_STANDARD 11)
- set(CMAKE_C_STANDARD_REQUIRED ON)
- set(CMAKE_C_EXTENSIONS OFF)
-endif()
-
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
- set(CXX_STANDARD_REQUIRED ON)
- set(CMAKE_CXX_EXTENSIONS OFF)
-endif()
-
-# Get user-provided variables
-set(DOWNLOAD_ARTIFACTS OFF CACHE BOOL "enable artifact download")
-
-# Clang tidy
-if(TIDY_WITH_CLANG)
- string(CONCAT CMAKE_CXX_CLANG_TIDY
- "clang-tidy;"
- "-checks=-*,"
- "bugprone-*,"
- "cert-*,"
- "cppcoreguidelines-*,"
- "clang-analyze-*,"
- "google-*,"
- "hicpp-*,"
- "modernize-*,"
- "performance-*,"
- "readability-*")
-endif()
-
-# Try to adhere to strict ISO C++ as much as possible:
-# from https://lefticus.gitbooks.io/cpp-best-practices/content/02-Use_the_Tools_Available.html
-function(autoware_set_compile_options target)
-
- if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- # Causes the visibility macros to use dllexport rather than dllimport,
- # which is appropriate when building the dll but not consuming it.
- string(TOUPPER ${target} PROJECT_NAME_UPPER)
- target_compile_options(${target} PRIVATE "/bigobj")
- target_compile_definitions(${target} PRIVATE
- ${PROJECT_NAME_UPPER}_BUILDING_DLL
- -D_CRT_NONSTDC_NO_WARNINGS
- -D_CRT_SECURE_NO_WARNINGS
- -D_WINSOCK_DEPRECATED_NO_WARNINGS)
- endif()
-
- if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- target_compile_options(${target} PRIVATE
- -Wall
- -Werror
- -Wextra
- #-Wshadow # causes issues with ROS 2 headers
- #-Wnon-virtual-dtor # causes issues with ROS 2 headers
- -pedantic
- -Wcast-align
- -Wunused
- -Wconversion
- -Wsign-conversion
- -Wdouble-promotion
- -Waddress
- #-Wnull-dereference # gcc6
- #-Wduplicated-branches # gcc7
- #-Wduplicated-cond # gcc6
- #-Wrestrict # gcc7
- -fvisibility=hidden)
- # C++-only options
- target_compile_options(${target}
- PRIVATE $<$: -Woverloaded-virtual -Wold-style-cast>)
- endif()
-
- if(CMAKE_COMPILER_IS_GNUCXX)
- target_compile_options(${target}
- PUBLIC $<$: -Wuseless-cast>)
- target_compile_options(${target} PRIVATE -Wlogical-op -frecord-gcc-switches)
- endif()
-
-endfunction()
-
-# Turn off optimization compiler flags for `target` unless the variable `AUTOWARE_OPTIMIZATION_OF_SLOW_TARGETS` is
-# defined and evaluates to `true` in a boolean context.
-function(autoware_turn_off_optimization target)
-
- if(AUTOWARE_OPTIMIZATION_OF_SLOW_TARGETS)
- # do nothing
- else()
- if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- target_compile_options(${target} PRIVATE -O0)
- endif()
- endif()
-
-endfunction()
diff --git a/common/autoware_auto_cmake/design/autoware_auto_cmake-design.md b/common/autoware_auto_cmake/design/autoware_auto_cmake-design.md
deleted file mode 100644
index 8946a02f8d951..0000000000000
--- a/common/autoware_auto_cmake/design/autoware_auto_cmake-design.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# autoware_auto_cmake {#autoware-auto-cmake-design}
-
-This is the design document for the `autoware_auto_cmake` package.
-
-## Purpose
-
-Provide common CMake variables and functions to Autoware packages.
-
-Those include:
-
-- Setting the language standard
-- Getting user-provided variables
-- Providing functions to:
- - set compiler flags
- - turn off optimizations
-
-## Design
-
-### Usage
-
-Add `autoware_auto_cmake` as a "build_depend" in the dependent packages.
-
-#### CMake variables {#cmake-config-variables}
-
-| Name | Type | Descritpion | Default |
-| -------------------- | ------ | ------------------------------------------ | ------- |
-| `DOWNLOAD_ARTIFACTS` | _BOOL_ | Allow downloading artifacts at build time. | `OFF` |
diff --git a/common/autoware_auto_cmake/package.xml b/common/autoware_auto_cmake/package.xml
deleted file mode 100644
index 0bb6c22fac2b8..0000000000000
--- a/common/autoware_auto_cmake/package.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
- autoware_auto_cmake
- 1.0.0
- Import the compiler settings defined for Autoware.Auto
- Apex.AI, Inc.
- Apache 2.0
-
- ament_cmake_auto
- ament_cmake_lint_cmake
-
- ros_environment
-
- ament_cmake_copyright
- ament_cmake_core
- ament_cmake_cppcheck
- ament_cmake_cpplint
- ament_cmake_lint_cmake
- ament_cmake_uncrustify
-
- ament_cmake_lint_cmake
- ament_lint_auto
- autoware_lint_common
-
-
- ament_cmake
-
-
diff --git a/common/autoware_auto_common/CMakeLists.txt b/common/autoware_auto_common/CMakeLists.txt
index 6d30f1993b24f..adac582e50c78 100644
--- a/common/autoware_auto_common/CMakeLists.txt
+++ b/common/autoware_auto_common/CMakeLists.txt
@@ -1,33 +1,13 @@
cmake_minimum_required(VERSION 3.5)
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
@@ -41,7 +21,6 @@ if(BUILD_TESTING)
test/test_type_name.cpp
test/test_type_traits.cpp
)
- autoware_set_compile_options(${TEST_COMMON})
target_compile_options(${TEST_COMMON} PRIVATE -Wno-sign-conversion)
target_include_directories(${TEST_COMMON} PRIVATE include)
ament_target_dependencies(${TEST_COMMON}
@@ -51,5 +30,4 @@ if(BUILD_TESTING)
)
endif()
-# Ament Exporting
ament_auto_package()
diff --git a/common/autoware_auto_common/package.xml b/common/autoware_auto_common/package.xml
index d17b44fdba0a0..dca22e9b29ea3 100644
--- a/common/autoware_auto_common/package.xml
+++ b/common/autoware_auto_common/package.xml
@@ -8,7 +8,8 @@
Apache License 2.0
ament_cmake_auto
- autoware_auto_cmake
+
+ autoware_cmake
builtin_interfaces
eigen
diff --git a/common/autoware_auto_geometry/CMakeLists.txt b/common/autoware_auto_geometry/CMakeLists.txt
index eedff63194af9..45dfb6c0b2fd3 100644
--- a/common/autoware_auto_geometry/CMakeLists.txt
+++ b/common/autoware_auto_geometry/CMakeLists.txt
@@ -1,18 +1,15 @@
cmake_minimum_required(VERSION 3.5)
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
include/geometry/spatial_hash_config.hpp
src/spatial_hash.cpp
src/bounding_box.cpp)
-autoware_set_compile_options(${PROJECT_NAME})
# workaround to allow deprecated header to build on both galactic and rolling
if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
@@ -22,10 +19,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
@@ -37,7 +30,6 @@ if(BUILD_TESTING)
test/src/test_intersection.cpp
)
ament_add_gtest(${GEOMETRY_GTEST} ${GEOMETRY_SRC})
- autoware_set_compile_options(${GEOMETRY_GTEST})
target_compile_options(${GEOMETRY_GTEST} PRIVATE -Wno-conversion -Wno-sign-conversion)
target_include_directories(${GEOMETRY_GTEST} PRIVATE "test/include" "include")
ament_target_dependencies(${GEOMETRY_GTEST}
@@ -50,5 +42,4 @@ if(BUILD_TESTING)
target_link_libraries(${GEOMETRY_GTEST} ${PROJECT_NAME})
endif()
-# Ament Exporting
ament_auto_package()
diff --git a/common/autoware_auto_geometry/package.xml b/common/autoware_auto_geometry/package.xml
index 267ed8bab95ca..976cf59013370 100644
--- a/common/autoware_auto_geometry/package.xml
+++ b/common/autoware_auto_geometry/package.xml
@@ -8,7 +8,8 @@
Apache License 2.0
ament_cmake_auto
- autoware_auto_cmake
+
+ autoware_cmake
autoware_auto_common
autoware_auto_geometry_msgs
diff --git a/common/autoware_auto_perception_rviz_plugin/CMakeLists.txt b/common/autoware_auto_perception_rviz_plugin/CMakeLists.txt
index ca775c0bcc8e7..b5db594dbc00d 100644
--- a/common/autoware_auto_perception_rviz_plugin/CMakeLists.txt
+++ b/common/autoware_auto_perception_rviz_plugin/CMakeLists.txt
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.5)
project(autoware_auto_perception_rviz_plugin)
-#dependencies
-find_package(ament_cmake_auto REQUIRED)
+find_package(autoware_cmake REQUIRED)
+autoware_package()
+
find_package(Qt5 REQUIRED COMPONENTS Widgets)
-ament_auto_find_build_dependencies()
set(OD_PLUGIN_LIB_SRC
src/object_detection/detected_objects_display.cpp
@@ -56,12 +56,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_perception_rviz_plugin/package.xml b/common/autoware_auto_perception_rviz_plugin/package.xml
index 3bcbaa6294535..1ee6207640b13 100644
--- a/common/autoware_auto_perception_rviz_plugin/package.xml
+++ b/common/autoware_auto_perception_rviz_plugin/package.xml
@@ -10,6 +10,7 @@
ament_cmake
+ autoware_cmake
qtbase5-dev
autoware_auto_perception_msgs
diff --git a/common/autoware_auto_tf2/CMakeLists.txt b/common/autoware_auto_tf2/CMakeLists.txt
index f1c33922a29ee..46ebb8a6381fd 100755
--- a/common/autoware_auto_tf2/CMakeLists.txt
+++ b/common/autoware_auto_tf2/CMakeLists.txt
@@ -1,20 +1,11 @@
cmake_minimum_required(VERSION 3.5)
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)
- autoware_set_compile_options(test_tf2_autoware_auto_msgs)
# 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(test_tf2_autoware_auto_msgs PRIVATE
diff --git a/common/autoware_auto_tf2/package.xml b/common/autoware_auto_tf2/package.xml
index 08790d2306396..d6fbd4f4ce3d8 100644
--- a/common/autoware_auto_tf2/package.xml
+++ b/common/autoware_auto_tf2/package.xml
@@ -8,7 +8,8 @@
Apache License 2.0
ament_cmake
- autoware_auto_cmake
+
+ autoware_cmake
autoware_auto_common
autoware_auto_geometry_msgs
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_point_types/package.xml b/common/autoware_point_types/package.xml
index 21f11c2b8085c..b7449dbbd13d5 100644
--- a/common/autoware_point_types/package.xml
+++ b/common/autoware_point_types/package.xml
@@ -14,6 +14,8 @@
ament_cmake_core
ament_cmake_test
+ autoware_cmake
+
ament_cmake_copyright
ament_cmake_cppcheck
ament_cmake_lint_cmake
diff --git a/common/autoware_testing/CMakeLists.txt b/common/autoware_testing/CMakeLists.txt
index 5292f6788fdfd..8cd085cd80bab 100644
--- a/common/autoware_testing/CMakeLists.txt
+++ b/common/autoware_testing/CMakeLists.txt
@@ -1,19 +1,13 @@
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/autoware_testing/package.xml b/common/autoware_testing/package.xml
index 9ed51521a1db7..d895d85122ae8 100644
--- a/common/autoware_testing/package.xml
+++ b/common/autoware_testing/package.xml
@@ -10,6 +10,8 @@
ament_cmake_auto
ament_cmake_lint_cmake
+ autoware_cmake
+
ament_cmake_core
ament_copyright
ament_flake8
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/component_interface_utils/package.xml b/common/component_interface_utils/package.xml
index 3eebdfcd52e55..6a67111bc2c99 100644
--- a/common/component_interface_utils/package.xml
+++ b/common/component_interface_utils/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_ad_api_msgs
rclcpp
rclcpp_components
diff --git a/common/fake_test_node/CMakeLists.txt b/common/fake_test_node/CMakeLists.txt
index 9c1cd0bdaf65d..609e8d1ce1495 100644
--- a/common/fake_test_node/CMakeLists.txt
+++ b/common/fake_test_node/CMakeLists.txt
@@ -1,23 +1,15 @@
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)
-autoware_set_compile_options(fake_test_node)
-## 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
)
- autoware_set_compile_options(test_fake_test_node)
add_dependencies(test_fake_test_node fake_test_node)
target_link_libraries(test_fake_test_node fake_test_node)
endif()
diff --git a/common/fake_test_node/package.xml b/common/fake_test_node/package.xml
index 7220fb7e1b7ef..6d337906ff3b7 100644
--- a/common/fake_test_node/package.xml
+++ b/common/fake_test_node/package.xml
@@ -8,7 +8,8 @@
Apache 2.0
ament_cmake_auto
- autoware_auto_cmake
+
+ autoware_cmake
ament_cmake_gtest
autoware_auto_common
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/global_parameter_loader/package.xml b/common/global_parameter_loader/package.xml
index 37748ff15dda8..97e679334e6c2 100644
--- a/common/global_parameter_loader/package.xml
+++ b/common/global_parameter_loader/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
vehicle_info_util
ament_lint_auto
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/goal_distance_calculator/package.xml b/common/goal_distance_calculator/package.xml
index 66a911d8e9786..e9b1e83ab2d0b 100644
--- a/common/goal_distance_calculator/package.xml
+++ b/common/goal_distance_calculator/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
autoware_auto_planning_msgs
geometry_msgs
rclcpp
diff --git a/common/had_map_utils/CMakeLists.txt b/common/had_map_utils/CMakeLists.txt
index 36d9be734b352..be80c638eaa37 100644
--- a/common/had_map_utils/CMakeLists.txt
+++ b/common/had_map_utils/CMakeLists.txt
@@ -1,18 +1,11 @@
cmake_minimum_required(VERSION 3.5)
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
@@ -33,11 +26,5 @@ 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)
-autoware_set_compile_options(${PROJECT_NAME})
-
-# if(BUILD_TESTING)
-# find_package(ament_lint_auto REQUIRED)
-# ament_lint_auto_find_test_dependencies()
-# endif()
ament_auto_package()
diff --git a/common/had_map_utils/package.xml b/common/had_map_utils/package.xml
index 79a2cdd883dc7..2baa56aa12c73 100644
--- a/common/had_map_utils/package.xml
+++ b/common/had_map_utils/package.xml
@@ -8,8 +8,8 @@
Apache 2.0
ament_cmake_auto
- autoware_auto_cmake
+ autoware_cmake
rclcpp
sensor_msgs
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 a6e38fe7de130..213616b007a19 100644
--- a/common/interpolation/package.xml
+++ b/common/interpolation/package.xml
@@ -10,8 +10,11 @@
ament_cmake_auto
+ autoware_cmake
+
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/kalman_filter/package.xml b/common/kalman_filter/package.xml
index e46d109f272d7..6771e3c1a3238 100644
--- a/common/kalman_filter/package.xml
+++ b/common/kalman_filter/package.xml
@@ -11,6 +11,8 @@
ament_cmake_auto
+ autoware_cmake
+
ament_cmake_cppcheck
ament_lint_auto
diff --git a/common/motion_common/CMakeLists.txt b/common/motion_common/CMakeLists.txt
index be983d93d4886..4a21808559dca 100644
--- a/common/motion_common/CMakeLists.txt
+++ b/common/motion_common/CMakeLists.txt
@@ -1,19 +1,16 @@
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
src/motion_common/trajectory_common.cpp
)
-autoware_set_compile_options(${PROJECT_NAME})
# workaround to allow deprecated header to build on both galactic and rolling
if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
@@ -22,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()
@@ -33,7 +28,6 @@ if(BUILD_TESTING)
# test/sanity_checks.cpp
# test/interpolation.cpp
# test/trajectory.cpp)
- #autoware_set_compile_options(motion_common_unit_tests)
#target_compile_options(motion_common_unit_tests PRIVATE -Wno-float-conversion)
#target_link_libraries(motion_common_unit_tests ${PROJECT_NAME})
#add_dependencies(motion_common_unit_tests ${PROJECT_NAME})
diff --git a/common/motion_common/package.xml b/common/motion_common/package.xml
index 9ff535764c235..2dab5c98abb80 100644
--- a/common/motion_common/package.xml
+++ b/common/motion_common/package.xml
@@ -8,9 +8,9 @@
Apache License 2.0
ament_cmake_auto
- autoware_auto_cmake
- autoware_auto_cmake
+ autoware_cmake
+ motion_testing
autoware_auto_common
autoware_auto_geometry
@@ -21,8 +21,6 @@
tf2_geometry_msgs
time_utils
- motion_testing
-
ament_lint_auto
apex_test_tools
autoware_lint_common
diff --git a/common/motion_testing/CMakeLists.txt b/common/motion_testing/CMakeLists.txt
index d6e17f6922d2d..0cb936271a478 100644
--- a/common/motion_testing/CMakeLists.txt
+++ b/common/motion_testing/CMakeLists.txt
@@ -1,14 +1,10 @@
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)
-autoware_set_compile_options(${PROJECT_NAME})
# workaround to allow deprecated header to build on both galactic and rolling
if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
@@ -17,17 +13,11 @@ 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
test/trajectory_checks.cpp)
- autoware_set_compile_options(motion_testing_unit_tests)
target_compile_options(motion_testing_unit_tests PRIVATE -Wno-sign-conversion)
target_link_libraries(motion_testing_unit_tests ${PROJECT_NAME})
add_dependencies(motion_testing_unit_tests ${PROJECT_NAME})
diff --git a/common/motion_testing/package.xml b/common/motion_testing/package.xml
index 12b39331948fa..33e7b4798d0e7 100644
--- a/common/motion_testing/package.xml
+++ b/common/motion_testing/package.xml
@@ -8,18 +8,17 @@
Apache License 2.0
ament_cmake_auto
- autoware_auto_cmake
- autoware_auto_cmake
-
- autoware_auto_planning_msgs
- autoware_auto_vehicle_msgs
autoware_auto_planning_msgs
autoware_auto_vehicle_msgs
+ autoware_cmake
tf2
tf2_geometry_msgs
time_utils
+ autoware_auto_planning_msgs
+ autoware_auto_vehicle_msgs
+
ament_cmake_gtest
ament_lint_auto
autoware_lint_common
diff --git a/common/osqp_interface/CMakeLists.txt b/common/osqp_interface/CMakeLists.txt
index 6276ac4c321c6..e459df86b86f8 100644
--- a/common/osqp_interface/CMakeLists.txt
+++ b/common/osqp_interface/CMakeLists.txt
@@ -1,14 +1,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)
@@ -26,12 +22,10 @@ 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}
)
-autoware_set_compile_options(${PROJECT_NAME})
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-error=old-style-cast -Wno-error=useless-cast)
target_include_directories(osqp_interface
@@ -49,22 +43,15 @@ 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
)
set(TEST_OSQP_INTERFACE_EXE test_osqp_interface)
ament_add_gtest(${TEST_OSQP_INTERFACE_EXE} ${TEST_SOURCES})
- autoware_set_compile_options(${TEST_OSQP_INTERFACE_EXE})
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/osqp_interface/package.xml b/common/osqp_interface/package.xml
index 358ee2ddd85cb..f89810ddda953 100644
--- a/common/osqp_interface/package.xml
+++ b/common/osqp_interface/package.xml
@@ -8,7 +8,8 @@
Apache 2.0
ament_cmake_auto
- autoware_auto_cmake
+
+ autoware_cmake
autoware_auto_common
eigen
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/path_distance_calculator/package.xml b/common/path_distance_calculator/package.xml
index 5343f44632f72..49d93ba161e63 100644
--- a/common/path_distance_calculator/package.xml
+++ b/common/path_distance_calculator/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
autoware_auto_planning_msgs
rclcpp
rclcpp_components
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/polar_grid/package.xml b/common/polar_grid/package.xml
index 24a724dfc56cc..75118d09ef5d2 100644
--- a/common/polar_grid/package.xml
+++ b/common/polar_grid/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
libqt5-core
libqt5-gui
libqt5-widgets
diff --git a/common/signal_processing/CMakeLists.txt b/common/signal_processing/CMakeLists.txt
index 7b1398eb54d65..072b55dfab4cb 100644
--- a/common/signal_processing/CMakeLists.txt
+++ b/common/signal_processing/CMakeLists.txt
@@ -1,41 +1,20 @@
cmake_minimum_required(VERSION 3.5)
project(signal_processing)
-if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 17)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
- set(CMAKE_CXX_EXTENSIONS OFF)
-endif()
-
-if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- add_compile_options(-Wall -Wextra -Wpedantic)
-endif()
+find_package(autoware_cmake REQUIRED)
+autoware_package()
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-ament_auto_add_library(lowpass_filters SHARED
+ament_auto_add_library(lowpass_filter_1d SHARED
src/lowpass_filter_1d.cpp
- src/butterworth.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
- test/src/butterworth_filter_test.cpp)
-
- target_include_directories(test_signal_processing PUBLIC test/include)
+ )
target_link_libraries(test_signal_processing
- lowpass_filters)
-
-
+ lowpass_filter_1d
+ )
endif()
ament_auto_package()
-
-add_executable(main_butterworth usage_examples/main_butterworth.cpp)
-target_link_libraries(main_butterworth lowpass_filters)
\ No newline at end of file
diff --git a/common/signal_processing/package.xml b/common/signal_processing/package.xml
index 8f27e4262fd7b..563715af77248 100644
--- a/common/signal_processing/package.xml
+++ b/common/signal_processing/package.xml
@@ -1,21 +1,22 @@
- signal_processing
- 0.1.0
- The signal processing package
- Takayuki Murooka
- Ali Boyali
+ signal_processing
+ 0.1.0
+ The signal processing package
+ Takayuki Murooka
- Apache License 2.0
+ Apache License 2.0
- ament_cmake_auto
+ autoware_cmake
- ament_cmake_gtest
- ament_lint_auto
- autoware_lint_common
+ ament_cmake_auto
-
- ament_cmake
-
+ ament_cmake_gtest
+ ament_lint_auto
+ autoware_lint_common
+
+
+ ament_cmake
+
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_api_utils/package.xml b/common/tier4_api_utils/package.xml
index ba307d694a56c..99a03ab92b0ec 100644
--- a/common/tier4_api_utils/package.xml
+++ b/common/tier4_api_utils/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
rclcpp
tier4_external_api_msgs
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_autoware_utils/package.xml b/common/tier4_autoware_utils/package.xml
index da44047b49b52..f1bd523a8eda1 100644
--- a/common/tier4_autoware_utils/package.xml
+++ b/common/tier4_autoware_utils/package.xml
@@ -10,6 +10,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_planning_msgs
builtin_interfaces
diagnostic_msgs
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_calibration_rviz_plugin/package.xml b/common/tier4_calibration_rviz_plugin/package.xml
index a6149ea97d8fd..2f8b13c4b9792 100644
--- a/common/tier4_calibration_rviz_plugin/package.xml
+++ b/common/tier4_calibration_rviz_plugin/package.xml
@@ -11,6 +11,8 @@
ament_cmake_auto
+ autoware_cmake
+
libqt5-core
libqt5-widgets
qtbase5-dev
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_datetime_rviz_plugin/package.xml b/common/tier4_datetime_rviz_plugin/package.xml
index 7a8074b612542..d6780c061c9a2 100644
--- a/common/tier4_datetime_rviz_plugin/package.xml
+++ b/common/tier4_datetime_rviz_plugin/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
libqt5-core
libqt5-gui
libqt5-widgets
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_debug_tools/package.xml b/common/tier4_debug_tools/package.xml
index e2bd5d4f5323c..3351b15ecea15 100644
--- a/common/tier4_debug_tools/package.xml
+++ b/common/tier4_debug_tools/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_planning_msgs
geometry_msgs
rclcpp
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_localization_rviz_plugin/package.xml b/common/tier4_localization_rviz_plugin/package.xml
index ae8371ca6d413..4f95f347bb1ee 100644
--- a/common/tier4_localization_rviz_plugin/package.xml
+++ b/common/tier4_localization_rviz_plugin/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
geometry_msgs
libqt5-core
libqt5-gui
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_perception_rviz_plugin/package.xml b/common/tier4_perception_rviz_plugin/package.xml
index 4889cf1189bfd..bb130ceda42e5 100644
--- a/common/tier4_perception_rviz_plugin/package.xml
+++ b/common/tier4_perception_rviz_plugin/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
dummy_perception_publisher
libqt5-core
libqt5-gui
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_planning_rviz_plugin/package.xml b/common/tier4_planning_rviz_plugin/package.xml
index 69ca20e0663be..3e6feb31615de 100644
--- a/common/tier4_planning_rviz_plugin/package.xml
+++ b/common/tier4_planning_rviz_plugin/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
autoware_auto_planning_msgs
libqt5-core
libqt5-gui
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_simulated_clock_rviz_plugin/package.xml b/common/tier4_simulated_clock_rviz_plugin/package.xml
index 5604ea0967603..d7fd09e57b0bb 100644
--- a/common/tier4_simulated_clock_rviz_plugin/package.xml
+++ b/common/tier4_simulated_clock_rviz_plugin/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
libqt5-core
libqt5-gui
libqt5-widgets
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_state_rviz_plugin/package.xml b/common/tier4_state_rviz_plugin/package.xml
index b7e71993e3b8b..2afbe9c315f75 100644
--- a/common/tier4_state_rviz_plugin/package.xml
+++ b/common/tier4_state_rviz_plugin/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_system_msgs
autoware_auto_vehicle_msgs
libqt5-core
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_traffic_light_rviz_plugin/package.xml b/common/tier4_traffic_light_rviz_plugin/package.xml
index 19de03ddb982b..724cf69d01f25 100644
--- a/common/tier4_traffic_light_rviz_plugin/package.xml
+++ b/common/tier4_traffic_light_rviz_plugin/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
libqt5-core
libqt5-gui
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/tier4_vehicle_rviz_plugin/package.xml b/common/tier4_vehicle_rviz_plugin/package.xml
index bbd2dc6c8cec8..15d6609248a4e 100644
--- a/common/tier4_vehicle_rviz_plugin/package.xml
+++ b/common/tier4_vehicle_rviz_plugin/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_vehicle_msgs
libqt5-core
libqt5-gui
diff --git a/common/time_utils/CMakeLists.txt b/common/time_utils/CMakeLists.txt
index 63e28887ed288..80d59a39762f6 100644
--- a/common/time_utils/CMakeLists.txt
+++ b/common/time_utils/CMakeLists.txt
@@ -1,21 +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)
-autoware_set_compile_options(${PROJECT_NAME})
-
-### 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/time_utils/package.xml b/common/time_utils/package.xml
index 176031b249a3f..9b553289e09be 100644
--- a/common/time_utils/package.xml
+++ b/common/time_utils/package.xml
@@ -8,9 +8,8 @@
Apache License 2.0
ament_cmake_auto
- autoware_auto_cmake
- autoware_auto_cmake
+ autoware_cmake
builtin_interfaces
ament_cmake_gtest
diff --git a/common/vehicle_constants_manager/CMakeLists.txt b/common/vehicle_constants_manager/CMakeLists.txt
index f10586e1140a8..4a667b47c5258 100644
--- a/common/vehicle_constants_manager/CMakeLists.txt
+++ b/common/vehicle_constants_manager/CMakeLists.txt
@@ -1,9 +1,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)
@@ -12,24 +11,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})
-autoware_set_compile_options(${PROJECT_NAME})
-# 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})
-# autoware_set_compile_options(${TEST_VEHICLE_CONSTANTS_MANAGER_EXE})
# 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/vehicle_constants_manager/package.xml b/common/vehicle_constants_manager/package.xml
index a9a5461bb6c4f..eecb3e8f2108f 100644
--- a/common/vehicle_constants_manager/package.xml
+++ b/common/vehicle_constants_manager/package.xml
@@ -8,14 +8,14 @@
Apache 2.0
ament_cmake_auto
- autoware_auto_cmake
+
+ autoware_cmake
autoware_auto_common
rclcpp
rclcpp_components
ament_cmake_gtest
- autoware_auto_cmake
ament_cmake
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/common/web_controller/package.xml b/common/web_controller/package.xml
index 865b2b95892ae..b1cdadf43238e 100644
--- a/common/web_controller/package.xml
+++ b/common/web_controller/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
autoware_auto_system_msgs
rosbridge_server
std_msgs
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/control_performance_analysis/package.xml b/control/control_performance_analysis/package.xml
index 2e0b1ec6d661b..4b4d2f8e61c24 100644
--- a/control/control_performance_analysis/package.xml
+++ b/control/control_performance_analysis/package.xml
@@ -10,6 +10,8 @@
ament_cmake_auto
rosidl_default_generators
+ autoware_cmake
+
autoware_auto_control_msgs
autoware_auto_planning_msgs
autoware_auto_vehicle_msgs
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/external_cmd_selector/package.xml b/control/external_cmd_selector/package.xml
index 8ae885c29b357..4bcc97be811f5 100644
--- a/control/external_cmd_selector/package.xml
+++ b/control/external_cmd_selector/package.xml
@@ -11,6 +11,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_vehicle_msgs
diagnostic_updater
geometry_msgs
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/joy_controller/package.xml b/control/joy_controller/package.xml
index 9338d4673361c..11d47f8afa3d9 100644
--- a/control/joy_controller/package.xml
+++ b/control/joy_controller/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_control_msgs
autoware_auto_vehicle_msgs
geometry_msgs
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/lane_departure_checker/package.xml b/control/lane_departure_checker/package.xml
index f4cada4226691..1cf5fda88657f 100644
--- a/control/lane_departure_checker/package.xml
+++ b/control/lane_departure_checker/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_mapping_msgs
autoware_auto_planning_msgs
boost
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/obstacle_collision_checker/package.xml b/control/obstacle_collision_checker/package.xml
index 377272e8fa5e3..2c5f980b899be 100644
--- a/control/obstacle_collision_checker/package.xml
+++ b/control/obstacle_collision_checker/package.xml
@@ -11,6 +11,8 @@
ament_cmake
+ autoware_cmake
+
autoware_auto_planning_msgs
boost
diagnostic_updater
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/pure_pursuit/package.xml b/control/pure_pursuit/package.xml
index 3c1e24a7f210f..fb97ea262004d 100644
--- a/control/pure_pursuit/package.xml
+++ b/control/pure_pursuit/package.xml
@@ -10,6 +10,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_control_msgs
autoware_auto_planning_msgs
geometry_msgs
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/shift_decider/package.xml b/control/shift_decider/package.xml
index 7c9a8987ff89a..29033dcf960bf 100644
--- a/control/shift_decider/package.xml
+++ b/control/shift_decider/package.xml
@@ -11,6 +11,8 @@
ament_cmake
+ autoware_cmake
+
autoware_auto_control_msgs
autoware_auto_vehicle_msgs
rclcpp
diff --git a/control/trajectory_follower/CMakeLists.txt b/control/trajectory_follower/CMakeLists.txt
index c4c215f1b4502..b80513c6d8e36 100644
--- a/control/trajectory_follower/CMakeLists.txt
+++ b/control/trajectory_follower/CMakeLists.txt
@@ -1,12 +1,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)
@@ -40,12 +36,10 @@ 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}
)
-autoware_set_compile_options(${LATERAL_CONTROLLER_LIB})
target_compile_options(${LATERAL_CONTROLLER_LIB} PRIVATE -Wno-error=old-style-cast)
# workaround to allow deprecated header to build on both galactic and rolling
@@ -70,12 +64,10 @@ 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}
)
-autoware_set_compile_options(${LONGITUDINAL_CONTROLLER_LIB})
target_compile_options(${LONGITUDINAL_CONTROLLER_LIB} PRIVATE -Wno-error=old-style-cast)
# workaround to allow deprecated header to build on both galactic and rolling
@@ -85,12 +77,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
@@ -100,7 +87,6 @@ if(BUILD_TESTING)
)
set(TEST_LATERAL_CONTROLLER_EXE test_lateral_controller)
ament_add_gtest(${TEST_LATERAL_CONTROLLER_EXE} ${TEST_LAT_SOURCES})
- autoware_set_compile_options(${TEST_LATERAL_CONTROLLER_EXE})
target_link_libraries(${TEST_LATERAL_CONTROLLER_EXE} ${LATERAL_CONTROLLER_LIB})
# workaround to allow deprecated header to build on both galactic and rolling
@@ -118,7 +104,6 @@ if(BUILD_TESTING)
)
set(TEST_LONGITUDINAL_CONTROLLER_EXE test_longitudinal_controller)
ament_add_gtest(${TEST_LONGITUDINAL_CONTROLLER_EXE} ${TEST_LON_SOURCES})
- autoware_set_compile_options(${TEST_LONGITUDINAL_CONTROLLER_EXE})
target_link_libraries(${TEST_LONGITUDINAL_CONTROLLER_EXE} ${LONGITUDINAL_CONTROLLER_LIB})
# workaround to allow deprecated header to build on both galactic and rolling
@@ -129,6 +114,5 @@ if(BUILD_TESTING)
endif()
endif()
-# ament package generation and installing
ament_auto_package(INSTALL_TO_SHARE
)
diff --git a/control/trajectory_follower/package.xml b/control/trajectory_follower/package.xml
index 98a39e5c65520..4bc005335f4a9 100644
--- a/control/trajectory_follower/package.xml
+++ b/control/trajectory_follower/package.xml
@@ -8,7 +8,8 @@
Apache 2.0
ament_cmake_auto
- autoware_auto_cmake
+
+ autoware_cmake
autoware_auto_common
autoware_auto_control_msgs
diff --git a/control/trajectory_follower_nodes/CMakeLists.txt b/control/trajectory_follower_nodes/CMakeLists.txt
index f18575e34b6d9..3b6af90ecb523 100644
--- a/control/trajectory_follower_nodes/CMakeLists.txt
+++ b/control/trajectory_follower_nodes/CMakeLists.txt
@@ -1,8 +1,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
@@ -17,7 +17,6 @@ if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
)
endif()
-autoware_set_compile_options(${LATERAL_CONTROLLER_NODE})
# TODO(lateral_controller) : RCLCPP_ERROR_THROTTLE() has built-in old-style casts.
# TODO(lateral_controller) : Temporary workaround until this is fixed.
target_compile_options(${LATERAL_CONTROLLER_NODE} PRIVATE -Wno-error=old-style-cast)
@@ -32,7 +31,6 @@ ament_auto_add_library(${LONGITUDINAL_CONTROLLER_NODE} SHARED
src/longitudinal_controller_node.cpp
)
-autoware_set_compile_options(${LONGITUDINAL_CONTROLLER_NODE})
# TODO(longitudinal_controller) : RCLCPP_ERROR_THROTTLE() has built-in old-style casts.
# TODO(longitudinal_controller) : Temporary workaround until this is fixed.
target_compile_options(${LONGITUDINAL_CONTROLLER_NODE} PRIVATE -Wno-error=old-style-cast)
@@ -47,7 +45,6 @@ ament_auto_add_library(${LATLON_MUXER_NODE} SHARED
src/latlon_muxer_node.cpp
)
-autoware_set_compile_options(${LATLON_MUXER_NODE})
# TODO(latlon_muxer) : RCLCPP_ERROR_THROTTLE() has built-in old-style casts.
# TODO(latlon_muxer) : Temporary workaround until this is fixed.
target_compile_options(${LATLON_MUXER_NODE} PRIVATE -Wno-error=old-style-cast)
@@ -57,9 +54,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
@@ -68,7 +62,6 @@ if(BUILD_TESTING)
test/test_longitudinal_controller_node.cpp
)
ament_target_dependencies(${TRAJECTORY_FOLLOWER_NODES_TEST} fake_test_node)
- autoware_set_compile_options(${TRAJECTORY_FOLLOWER_NODES_TEST})
target_link_libraries(${TRAJECTORY_FOLLOWER_NODES_TEST} ${LATLON_MUXER_NODE} ${LATERAL_CONTROLLER_NODE} ${LONGITUDINAL_CONTROLLER_NODE})
#find_package(autoware_testing REQUIRED)
diff --git a/control/trajectory_follower_nodes/package.xml b/control/trajectory_follower_nodes/package.xml
index a6d789dec3598..0db906f84049c 100644
--- a/control/trajectory_follower_nodes/package.xml
+++ b/control/trajectory_follower_nodes/package.xml
@@ -8,7 +8,8 @@
Apache License 2.0
ament_cmake_auto
- autoware_auto_cmake
+
+ autoware_cmake
autoware_auto_control_msgs
autoware_auto_planning_msgs
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/control/vehicle_cmd_gate/package.xml b/control/vehicle_cmd_gate/package.xml
index 745f813721bcb..cb30c913ad766 100644
--- a/control/vehicle_cmd_gate/package.xml
+++ b/control/vehicle_cmd_gate/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
autoware_auto_control_msgs
autoware_auto_system_msgs
autoware_auto_vehicle_msgs
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_autoware_api_launch/package.xml b/launch/tier4_autoware_api_launch/package.xml
index a455e71ffd0bb..2a42e2bb52f55 100644
--- a/launch/tier4_autoware_api_launch/package.xml
+++ b/launch/tier4_autoware_api_launch/package.xml
@@ -10,6 +10,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_iv_external_api_adaptor
autoware_iv_internal_api_adaptor
awapi_awiv_adapter
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_control_launch/package.xml b/launch/tier4_control_launch/package.xml
index 54267af603443..2555c9175d697 100644
--- a/launch/tier4_control_launch/package.xml
+++ b/launch/tier4_control_launch/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
external_cmd_converter
lane_departure_checker
shift_decider
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_integration_launch/package.xml b/launch/tier4_integration_launch/package.xml
index f82b18f4d6434..bc7cd01b4b67a 100644
--- a/launch/tier4_integration_launch/package.xml
+++ b/launch/tier4_integration_launch/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_launch
python3-bson
python3-tornado
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_localization_launch/package.xml b/launch/tier4_localization_launch/package.xml
index aab0b13df6499..3183558f0940a 100644
--- a/launch/tier4_localization_launch/package.xml
+++ b/launch/tier4_localization_launch/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
ekf_localizer
gyro_odometer
ndt_scan_matcher
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_map_launch/package.xml b/launch/tier4_map_launch/package.xml
index 09b63ddc7352b..5ee9d81cb13f9 100644
--- a/launch/tier4_map_launch/package.xml
+++ b/launch/tier4_map_launch/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
map_loader
map_tf_generator
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_perception_launch/package.xml b/launch/tier4_perception_launch/package.xml
index b83c8b3676a32..394748945a6a0 100644
--- a/launch/tier4_perception_launch/package.xml
+++ b/launch/tier4_perception_launch/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
compare_map_segmentation
euclidean_cluster
ground_segmentation
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_planning_launch/package.xml b/launch/tier4_planning_launch/package.xml
index 0f3022c6f95e5..50cadf6101f0f 100644
--- a/launch/tier4_planning_launch/package.xml
+++ b/launch/tier4_planning_launch/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
behavior_velocity_planner
costmap_generator
external_velocity_limit_selector
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_sensing_launch/package.xml b/launch/tier4_sensing_launch/package.xml
index 1fa474889be7c..c35082aa7c1be 100644
--- a/launch/tier4_sensing_launch/package.xml
+++ b/launch/tier4_sensing_launch/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
vehicle_info_util
ament_lint_auto
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_simulator_launch/package.xml b/launch/tier4_simulator_launch/package.xml
index ff2f0f653566a..7964e7c499a11 100644
--- a/launch/tier4_simulator_launch/package.xml
+++ b/launch/tier4_simulator_launch/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
dummy_perception_publisher
fault_injection
simple_planning_simulator
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_system_launch/package.xml b/launch/tier4_system_launch/package.xml
index 5ba75d8a22745..f5675b60cce3c 100644
--- a/launch/tier4_system_launch/package.xml
+++ b/launch/tier4_system_launch/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
ad_service_state_monitor
emergency_handler
system_error_monitor
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/launch/tier4_vehicle_launch/package.xml b/launch/tier4_vehicle_launch/package.xml
index 9cc45db226b89..501316732d67b 100644
--- a/launch/tier4_vehicle_launch/package.xml
+++ b/launch/tier4_vehicle_launch/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
robot_state_publisher
xacro
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/ekf_localizer/package.xml b/localization/ekf_localizer/package.xml
index cb41fd678c838..c67cfaa400a0d 100644
--- a/localization/ekf_localizer/package.xml
+++ b/localization/ekf_localizer/package.xml
@@ -10,6 +10,7 @@
ament_cmake_auto
eigen3_cmake_module
+ autoware_cmake
eigen
geometry_msgs
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/gyro_odometer/package.xml b/localization/gyro_odometer/package.xml
index b9c05e5f19318..f2869ee024d90 100644
--- a/localization/gyro_odometer/package.xml
+++ b/localization/gyro_odometer/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
geometry_msgs
sensor_msgs
std_msgs
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/initial_pose_button_panel/package.xml b/localization/initial_pose_button_panel/package.xml
index c19d3995ee614..018308a2d827f 100644
--- a/localization/initial_pose_button_panel/package.xml
+++ b/localization/initial_pose_button_panel/package.xml
@@ -10,6 +10,9 @@
Yamato ANDO
ament_cmake_auto
+
+ autoware_cmake
+
geometry_msgs
libqt5-core
libqt5-widgets
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/localization_error_monitor/package.xml b/localization/localization_error_monitor/package.xml
index 67d2825d9ba6e..70f46272d2951 100644
--- a/localization/localization_error_monitor/package.xml
+++ b/localization/localization_error_monitor/package.xml
@@ -11,6 +11,8 @@
ament_cmake_auto
+ autoware_cmake
+
diagnostic_msgs
diagnostic_updater
eigen
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/package.xml b/localization/ndt/package.xml
index f368390a6becc..562cf813c99fa 100644
--- a/localization/ndt/package.xml
+++ b/localization/ndt/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
libpcl-all-dev
ndt_omp
ndt_pcl_modified
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_pcl_modified/package.xml b/localization/ndt_pcl_modified/package.xml
index 7365a968313c2..e461af6c35ca0 100644
--- a/localization/ndt_pcl_modified/package.xml
+++ b/localization/ndt_pcl_modified/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
libpcl-all-dev
ament_cmake_cppcheck
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/ndt_scan_matcher/package.xml b/localization/ndt_scan_matcher/package.xml
index f8f461fbc6949..e7da0e9931777 100644
--- a/localization/ndt_scan_matcher/package.xml
+++ b/localization/ndt_scan_matcher/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
diagnostic_msgs
fmt
geometry_msgs
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/pose2twist/package.xml b/localization/pose2twist/package.xml
index 9efcc859c8e27..71fd56f02f27e 100644
--- a/localization/pose2twist/package.xml
+++ b/localization/pose2twist/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
geometry_msgs
rclcpp
tf2_geometry_msgs
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/pose_initializer/package.xml b/localization/pose_initializer/package.xml
index 94bb67c5c28a0..88d184b504807 100644
--- a/localization/pose_initializer/package.xml
+++ b/localization/pose_initializer/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
geometry_msgs
libpcl-all-dev
pcl_conversions
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/stop_filter/package.xml b/localization/stop_filter/package.xml
index 3ae3aff3e980a..b4b948c236af4 100644
--- a/localization/stop_filter/package.xml
+++ b/localization/stop_filter/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
geometry_msgs
nav_msgs
rclcpp
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/localization/vehicle_velocity_converter/package.xml b/localization/vehicle_velocity_converter/package.xml
index afc01f892dd6c..e6816afb8b511 100644
--- a/localization/vehicle_velocity_converter/package.xml
+++ b/localization/vehicle_velocity_converter/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_vehicle_msgs
geometry_msgs
rclcpp
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/lanelet2_extension/package.xml b/map/lanelet2_extension/package.xml
index bd5ae7fa98687..e817b06f1be86 100644
--- a/map/lanelet2_extension/package.xml
+++ b/map/lanelet2_extension/package.xml
@@ -7,9 +7,10 @@
mitsudome-r
Apache License 2.0
- ament_cmake
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_mapping_msgs
geographiclib
geometry_msgs
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_loader/package.xml b/map/map_loader/package.xml
index 64c331c2438ca..aa345d6a153f6 100644
--- a/map/map_loader/package.xml
+++ b/map/map_loader/package.xml
@@ -8,9 +8,10 @@
Kenji Miyake
Apache License 2.0
- ament_cmake
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_mapping_msgs
geometry_msgs
lanelet2_extension
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/map_tf_generator/package.xml b/map/map_tf_generator/package.xml
index e1f74fd40511d..9aaf14bc5fda7 100644
--- a/map/map_tf_generator/package.xml
+++ b/map/map_tf_generator/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
libpcl-all-dev
pcl_conversions
rclcpp
diff --git a/map/util/lanelet2_map_preprocessor/CMakeLists.txt b/map/util/lanelet2_map_preprocessor/CMakeLists.txt
index 13d17586553f9..47939a8324930 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/map/util/lanelet2_map_preprocessor/package.xml b/map/util/lanelet2_map_preprocessor/package.xml
index 41b4243e56ba6..d416d6a455593 100644
--- a/map/util/lanelet2_map_preprocessor/package.xml
+++ b/map/util/lanelet2_map_preprocessor/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
lanelet2_extension
pcl_ros
rclcpp
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/compare_map_segmentation/package.xml b/perception/compare_map_segmentation/package.xml
index ad4665785aafa..ff4a17e837513 100644
--- a/perception/compare_map_segmentation/package.xml
+++ b/perception/compare_map_segmentation/package.xml
@@ -15,6 +15,8 @@
ament_cmake_auto
+ autoware_cmake
+
grid_map_pcl
grid_map_ros
pcl_conversions
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_feature_remover/package.xml b/perception/detected_object_feature_remover/package.xml
index de82f3ef1169f..686c01621c546 100644
--- a/perception/detected_object_feature_remover/package.xml
+++ b/perception/detected_object_feature_remover/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
autoware_auto_perception_msgs
rclcpp
rclcpp_components
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/detected_object_validation/package.xml b/perception/detected_object_validation/package.xml
index 7a7110792a324..47e1905f153d6 100644
--- a/perception/detected_object_validation/package.xml
+++ b/perception/detected_object_validation/package.xml
@@ -10,6 +10,8 @@
ament_cmake_auto
eigen3_cmake_module
+ autoware_cmake
+
autoware_auto_perception_msgs
message_filters
nav_msgs
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/detection_by_tracker/package.xml b/perception/detection_by_tracker/package.xml
index ec234e6636955..d42d650b731d8 100644
--- a/perception/detection_by_tracker/package.xml
+++ b/perception/detection_by_tracker/package.xml
@@ -10,6 +10,8 @@
ament_cmake_auto
eigen3_cmake_module
+ autoware_cmake
+
eigen
euclidean_cluster
libpcl-all-dev
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/elevation_map_loader/package.xml b/perception/elevation_map_loader/package.xml
index 308b555213d83..282c4e7cdb446 100644
--- a/perception/elevation_map_loader/package.xml
+++ b/perception/elevation_map_loader/package.xml
@@ -8,9 +8,10 @@
Taichi Higashide
Apache License 2.0
- ament_cmake
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_mapping_msgs
grid_map_cv
grid_map_pcl
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/euclidean_cluster/package.xml b/perception/euclidean_cluster/package.xml
index 39bcb091dca40..d99c923d91928 100644
--- a/perception/euclidean_cluster/package.xml
+++ b/perception/euclidean_cluster/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
compare_map_segmentation
geometry_msgs
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/ground_segmentation/package.xml b/perception/ground_segmentation/package.xml
index 4842fb688d92a..ace1698165af3 100644
--- a/perception/ground_segmentation/package.xml
+++ b/perception/ground_segmentation/package.xml
@@ -15,6 +15,8 @@
ament_cmake_auto
+ autoware_cmake
+
libopencv-dev
pcl_conversions
pcl_ros
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/image_projection_based_fusion/package.xml b/perception/image_projection_based_fusion/package.xml
index 7d0a64f91d60f..0665772bc2de0 100644
--- a/perception/image_projection_based_fusion/package.xml
+++ b/perception/image_projection_based_fusion/package.xml
@@ -9,6 +9,9 @@
Apache License 2.0
ament_cmake_auto
+
+ autoware_cmake
+
autoware_auto_perception_msgs
cv_bridge
image_transport
diff --git a/perception/lidar_apollo_instance_segmentation/CMakeLists.txt b/perception/lidar_apollo_instance_segmentation/CMakeLists.txt
index 0354ea649a3a6..51dda1a2eaffc 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)
@@ -9,21 +12,21 @@ option(CUDA_VERBOSE "Verbose output of CUDA modules" OFF)
# set flags for CUDA availability
option(CUDA_AVAIL "CUDA available" OFF)
find_package(CUDA)
-if (CUDA_FOUND)
+if(CUDA_FOUND)
find_library(CUBLAS_LIBRARIES cublas HINTS
${CUDA_TOOLKIT_ROOT_DIR}/lib64
${CUDA_TOOLKIT_ROOT_DIR}/lib
)
- if (CUDA_VERBOSE)
+ if(CUDA_VERBOSE)
message("CUDA is available!")
message("CUDA Libs: ${CUDA_LIBRARIES}")
message("CUDA Headers: ${CUDA_INCLUDE_DIRS}")
- endif ()
+ endif()
set(CUDA_AVAIL ON)
else()
message("CUDA NOT FOUND")
set(CUDA_AVAIL OFF)
-endif (CUDA_FOUND)
+endif()
# set flags for TensorRT availability
option(TRT_AVAIL "TensorRT available" OFF)
@@ -33,12 +36,12 @@ find_library(NVPARSERS NAMES nvparsers)
find_library(NVCAFFE_PARSER NAMES nvcaffe_parser)
find_library(NVINFER_PLUGIN NAMES nvinfer_plugin)
if(NVINFER AND NVPARSERS AND NVCAFFE_PARSER AND NVINFER_PLUGIN)
- if (CUDA_VERBOSE)
+ if(CUDA_VERBOSE)
message("TensorRT is available!")
message("NVINFER: ${NVINFER}")
message("NVPARSERS: ${NVPARSERS}")
message("NVCAFFE_PARSER: ${NVCAFFE_PARSER}")
- endif ()
+ endif()
set(TRT_AVAIL ON)
else()
message("TensorRT is NOT Available")
@@ -49,15 +52,16 @@ endif()
option(CUDNN_AVAIL "CUDNN available" OFF)
# try to find the CUDNN module
find_library(CUDNN_LIBRARY
-NAMES libcudnn.so${__cudnn_ver_suffix} libcudnn${__cudnn_ver_suffix}.dylib ${__cudnn_lib_win_name}
-PATHS $ENV{LD_LIBRARY_PATH} ${__libpath_cudart} ${CUDNN_ROOT_DIR} ${PC_CUDNN_LIBRARY_DIRS} ${CMAKE_INSTALL_PREFIX}
-PATH_SUFFIXES lib lib64 bin
-DOC "CUDNN library." )
+ NAMES libcudnn.so${__cudnn_ver_suffix} libcudnn${__cudnn_ver_suffix}.dylib ${__cudnn_lib_win_name}
+ PATHS $ENV{LD_LIBRARY_PATH} ${__libpath_cudart} ${CUDNN_ROOT_DIR} ${PC_CUDNN_LIBRARY_DIRS} ${CMAKE_INSTALL_PREFIX}
+ PATH_SUFFIXES lib lib64 bin
+ DOC "CUDNN library."
+)
if(CUDNN_LIBRARY)
- if (CUDA_VERBOSE)
+ if(CUDA_VERBOSE)
message("CUDNN is available!")
message("CUDNN_LIBRARY: ${CUDNN_LIBRARY}")
- endif ()
+ endif()
set(CUDNN_AVAIL ON)
else()
message("CUDNN is NOT Available")
@@ -65,47 +69,36 @@ else()
endif()
find_program(GDOWN_AVAIL "gdown")
-if (NOT GDOWN_AVAIL)
+if(NOT GDOWN_AVAIL)
message("gdown: command not found. External files could not be downloaded.")
endif()
if(TRT_AVAIL AND CUDA_AVAIL AND CUDNN_AVAIL)
# download weight files
set(PATH "${CMAKE_CURRENT_SOURCE_DIR}/data")
- if (NOT EXISTS "${PATH}")
+ if(NOT EXISTS "${PATH}")
execute_process(COMMAND mkdir -p ${PATH})
endif()
set(FILE "${PATH}/vlp-16.caffemodel")
message(STATUS "Checking and downloading vlp-16.caffemodel")
- if (NOT EXISTS "${FILE}")
+ if(NOT EXISTS "${FILE}")
message(STATUS "... file does not exist. Downloading now ...")
execute_process(COMMAND gdown "https://drive.google.com/uc?id=1bbO_eeGG5HUqyUiAYjOd6hUn-Zma0mMJ" -O ${PATH}/vlp-16.caffemodel)
endif()
set(FILE "${PATH}/hdl-64.caffemodel")
message(STATUS "Checking and downloading hdl-64.caffemodel")
- if (NOT EXISTS "${FILE}")
+ if(NOT EXISTS "${FILE}")
message(STATUS "... file does not exist. Downloading now ...")
execute_process(COMMAND gdown "https://drive.google.com/uc?id=1ZdB6V3jua3GmtYuY9NR1nc9QZe_ChjkP" -O ${PATH}/hdl-64.caffemodel)
endif()
set(FILE "${PATH}/vls-128.caffemodel")
message(STATUS "Checking and downloading vls-128.caffemodel")
- if (NOT EXISTS "${FILE}")
+ if(NOT EXISTS "${FILE}")
message(STATUS "... file does not exist. Downloading now ...")
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 +149,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 +156,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_apollo_instance_segmentation/package.xml b/perception/lidar_apollo_instance_segmentation/package.xml
index 0a152fa38426e..3f01d38f19643 100755
--- a/perception/lidar_apollo_instance_segmentation/package.xml
+++ b/perception/lidar_apollo_instance_segmentation/package.xml
@@ -12,6 +12,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
libpcl-all-dev
pcl_conversions
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/lidar_centerpoint/package.xml b/perception/lidar_centerpoint/package.xml
index 96d7c54b93ff7..71e8f71f6212f 100644
--- a/perception/lidar_centerpoint/package.xml
+++ b/perception/lidar_centerpoint/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
pcl_ros
rclcpp
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/map_based_prediction/package.xml b/perception/map_based_prediction/package.xml
index 6b54e118a168a..531d3e967b8ba 100644
--- a/perception/map_based_prediction/package.xml
+++ b/perception/map_based_prediction/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
autoware_auto_perception_msgs
interpolation
lanelet2_extension
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/multi_object_tracker/package.xml b/perception/multi_object_tracker/package.xml
index 55b5c7aa4e5d5..6bc48b5e0979d 100644
--- a/perception/multi_object_tracker/package.xml
+++ b/perception/multi_object_tracker/package.xml
@@ -11,6 +11,8 @@
ament_cmake_auto
eigen3_cmake_module
+ autoware_cmake
+
autoware_auto_perception_msgs
eigen
kalman_filter
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_merger/package.xml b/perception/object_merger/package.xml
index 285ee4fbd4351..7f86280369a98 100644
--- a/perception/object_merger/package.xml
+++ b/perception/object_merger/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
libpcl-all-dev
message_filters
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/object_range_splitter/package.xml b/perception/object_range_splitter/package.xml
index 3ac0e5d114c65..9a2ac13b35113 100644
--- a/perception/object_range_splitter/package.xml
+++ b/perception/object_range_splitter/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
rclcpp
rclcpp_components
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/occupancy_grid_map_outlier_filter/package.xml b/perception/occupancy_grid_map_outlier_filter/package.xml
index c44f9f4e7862a..748e9d93c227c 100644
--- a/perception/occupancy_grid_map_outlier_filter/package.xml
+++ b/perception/occupancy_grid_map_outlier_filter/package.xml
@@ -15,6 +15,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_vehicle_msgs
diagnostic_updater
image_transport
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/shape_estimation/package.xml b/perception/shape_estimation/package.xml
index 2fa8208d9a4a2..aa51c462b07dc 100644
--- a/perception/shape_estimation/package.xml
+++ b/perception/shape_estimation/package.xml
@@ -9,6 +9,8 @@
ament_cmake
+ autoware_cmake
+
autoware_auto_perception_msgs
builtin_interfaces
eigen
diff --git a/perception/tensorrt_yolo/CMakeLists.txt b/perception/tensorrt_yolo/CMakeLists.txt
index 2d04889b32eab..9823decd270c6 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/tensorrt_yolo/package.xml b/perception/tensorrt_yolo/package.xml
index 92422817e0c8a..68ca942435e06 100755
--- a/perception/tensorrt_yolo/package.xml
+++ b/perception/tensorrt_yolo/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
cv_bridge
image_transport
diff --git a/perception/traffic_light_classifier/CMakeLists.txt b/perception/traffic_light_classifier/CMakeLists.txt
index 76cb89264d702..a82057885191e 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)
@@ -15,21 +11,21 @@ option(CUDA_VERBOSE "Verbose output of CUDA modules" OFF)
# set flags for CUDA availability
option(CUDA_AVAIL "CUDA available" OFF)
find_package(CUDA)
-if (CUDA_FOUND)
+if(CUDA_FOUND)
find_library(CUBLAS_LIBRARIES cublas HINTS
${CUDA_TOOLKIT_ROOT_DIR}/lib64
${CUDA_TOOLKIT_ROOT_DIR}/lib
)
- if (CUDA_VERBOSE)
+ if(CUDA_VERBOSE)
message(STATUS "CUDA is available!")
message(STATUS "CUDA Libs: ${CUDA_LIBRARIES}")
message(STATUS "CUDA Headers: ${CUDA_INCLUDE_DIRS}")
- endif ()
+ endif()
set(CUDA_AVAIL ON)
else()
message(STATUS "CUDA NOT FOUND")
set(CUDA_AVAIL OFF)
-endif (CUDA_FOUND)
+endif()
# set flags for TensorRT availability
option(TRT_AVAIL "TensorRT available" OFF)
@@ -38,13 +34,13 @@ find_library(NVINFER NAMES nvinfer)
find_library(NVONNXPARSER nvonnxparser)
find_library(NVINFER_PLUGIN NAMES nvinfer_plugin)
if(NVINFER AND NVONNXPARSER AND NVINFER_PLUGIN)
- if (CUDA_VERBOSE)
+ if(CUDA_VERBOSE)
message(STATUS "TensorRT is available!")
message(STATUS "NVINFER: ${NVINFER}")
message(STATUS "NVPARSERS: ${NVPARSERS}")
message(STATUS "NVINFER_PLUGIN: ${NVINFER_PLUGIN}")
message(STATUS "NVONNXPARSER: ${NVONNXPARSER}")
- endif ()
+ endif()
set(TRT_AVAIL ON)
else()
message(STATUS "TensorRT is NOT Available")
@@ -58,12 +54,13 @@ find_library(CUDNN_LIBRARY
NAMES libcudnn.so${__cudnn_ver_suffix} libcudnn${__cudnn_ver_suffix}.dylib ${__cudnn_lib_win_name}
PATHS $ENV{LD_LIBRARY_PATH} ${__libpath_cudart} ${CUDNN_ROOT_DIR} ${PC_CUDNN_LIBRARY_DIRS} ${CMAKE_INSTALL_PREFIX}
PATH_SUFFIXES lib lib64 bin
- DOC "CUDNN library." )
+ DOC "CUDNN library."
+)
if(CUDNN_LIBRARY)
- if (CUDA_VERBOSE)
+ if(CUDA_VERBOSE)
message(STATUS "CUDNN is available!")
message(STATUS "CUDNN_LIBRARY: ${CUDNN_LIBRARY}")
- endif ()
+ endif()
set(CUDNN_AVAIL ON)
else()
@@ -78,18 +75,18 @@ set(LAMP_LABEL_LINK "https://drive.google.com/uc?id=1D7n3oGSWLkWgxET6PcWqEzOhmmP
set(LAMP_LABEL_HASH 20167c8e9a1f9d2ec7b0b0088c4100f0)
find_program(GDOWN_AVAIL "gdown")
-if (NOT GDOWN_AVAIL)
+if(NOT GDOWN_AVAIL)
message(STATUS "gdown: command not found. External files could not be downloaded.")
endif()
set(PATH "${CMAKE_CURRENT_SOURCE_DIR}/data")
-if (NOT EXISTS "${PATH}")
+if(NOT EXISTS "${PATH}")
execute_process(COMMAND mkdir -p ${PATH})
endif()
set(FILE "${PATH}/traffic_light_classifier_mobilenetv2.onnx")
message(STATUS "Checking and downloading traffic_light_classifier_mobilenetv2.onnx")
-if (EXISTS "${FILE}")
+if(EXISTS "${FILE}")
file(MD5 "${FILE}" EXISTING_FILE_HASH)
- if (NOT "${PRETRAINED_MODEL_HASH}" EQUAL "${EXISTING_FILE_HASH}")
+ if(NOT "${PRETRAINED_MODEL_HASH}" EQUAL "${EXISTING_FILE_HASH}")
message(STATUS "... file hash changed. Downloading now ...")
execute_process(COMMAND gdown --quiet "${PRETRAINED_MODEL_LINK}" -O ${PATH}/traffic_light_classifier_mobilenetv2.onnx)
endif()
@@ -100,9 +97,9 @@ endif()
set(FILE "${PATH}/lamp_labels.txt")
message(STATUS "Checking and downloading lamp_labels.txt")
-if (EXISTS "${FILE}")
+if(EXISTS "${FILE}")
file(MD5 "${FILE}" EXISTING_FILE_HASH)
- if (NOT "${LAMP_LABEL_HASH}" EQUAL "${EXISTING_FILE_HASH}")
+ if(NOT "${LAMP_LABEL_HASH}" EQUAL "${EXISTING_FILE_HASH}")
message(STATUS "... file does not exist. Downloading now ...")
execute_process(COMMAND gdown --quiet "${LAMP_LABEL_LINK}" -O ${PATH}/lamp_labels.txt)
endif()
@@ -123,7 +120,7 @@ if(TRT_AVAIL AND CUDA_AVAIL AND CUDNN_AVAIL)
utils
${OpenCV_INCLUDE_DIRS}
${CUDA_INCLUDE_DIRS}
- )
+ )
ament_auto_add_library(libutils SHARED
utils/trt_common.cpp
@@ -163,15 +160,15 @@ else()
include_directories(
${OpenCV_INCLUDE_DIRS}
- )
+ )
ament_auto_add_library(traffic_light_classifier_nodelet SHARED
src/color_classifier.cpp
src/nodelet.cpp
- )
+ )
target_link_libraries(traffic_light_classifier_nodelet
${OpenCV_LIBRARIES}
- )
+ )
rclcpp_components_register_node(traffic_light_classifier_nodelet
PLUGIN "traffic_light::TrafficLightClassifierNodelet"
diff --git a/perception/traffic_light_classifier/package.xml b/perception/traffic_light_classifier/package.xml
index b6cc6cd687872..5629d950040d1 100644
--- a/perception/traffic_light_classifier/package.xml
+++ b/perception/traffic_light_classifier/package.xml
@@ -10,6 +10,8 @@
ament_cmake_auto
wget
+ autoware_cmake
+
autoware_auto_perception_msgs
cv_bridge
image_transport
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_map_based_detector/package.xml b/perception/traffic_light_map_based_detector/package.xml
index f9fd2ae03b5cf..4da85f41816e6 100644
--- a/perception/traffic_light_map_based_detector/package.xml
+++ b/perception/traffic_light_map_based_detector/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_mapping_msgs
autoware_auto_perception_msgs
autoware_auto_planning_msgs
diff --git a/perception/traffic_light_ssd_fine_detector/CMakeLists.txt b/perception/traffic_light_ssd_fine_detector/CMakeLists.txt
index fdffc78737186..b9ae635dcc86b 100644
--- a/perception/traffic_light_ssd_fine_detector/CMakeLists.txt
+++ b/perception/traffic_light_ssd_fine_detector/CMakeLists.txt
@@ -1,44 +1,34 @@
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
option(CUDA_AVAIL "CUDA available" OFF)
find_package(CUDA)
-if (CUDA_FOUND)
+if(CUDA_FOUND)
find_library(CUBLAS_LIBRARIES cublas HINTS
${CUDA_TOOLKIT_ROOT_DIR}/lib64
${CUDA_TOOLKIT_ROOT_DIR}/lib
)
- if (CUDA_VERBOSE)
+ if(CUDA_VERBOSE)
message(STATUS "CUDA is available!")
message(STATUS "CUDA Libs: ${CUDA_LIBRARIES}")
message(STATUS "CUDA Headers: ${CUDA_INCLUDE_DIRS}")
- endif ()
+ endif()
set(CUDA_AVAIL ON)
else()
message(STATUS "CUDA NOT FOUND")
set(CUDA_AVAIL OFF)
-endif (CUDA_FOUND)
+endif()
# set flags for TensorRT availability
option(TRT_AVAIL "TensorRT available" OFF)
@@ -47,13 +37,13 @@ find_library(NVINFER NAMES nvinfer)
find_library(NVONNXPARSER nvonnxparser)
find_library(NVINFER_PLUGIN NAMES nvinfer_plugin)
if(NVINFER AND NVONNXPARSER AND NVINFER_PLUGIN)
- if (CUDA_VERBOSE)
+ if(CUDA_VERBOSE)
message(STATUS "TensorRT is available!")
message(STATUS "NVINFER: ${NVINFER}")
message(STATUS "NVPARSERS: ${NVPARSERS}")
message(STATUS "NVINFER_PLUGIN: ${NVINFER_PLUGIN}")
message(STATUS "NVONNXPARSER: ${NVONNXPARSER}")
- endif ()
+ endif()
set(TRT_AVAIL ON)
else()
message(STATUS "TensorRT is NOT Available")
@@ -64,15 +54,16 @@ endif()
option(CUDNN_AVAIL "CUDNN available" OFF)
# try to find the CUDNN module
find_library(CUDNN_LIBRARY
-NAMES libcudnn.so${__cudnn_ver_suffix} libcudnn${__cudnn_ver_suffix}.dylib ${__cudnn_lib_win_name}
-PATHS $ENV{LD_LIBRARY_PATH} ${__libpath_cudart} ${CUDNN_ROOT_DIR} ${PC_CUDNN_LIBRARY_DIRS} ${CMAKE_INSTALL_PREFIX}
-PATH_SUFFIXES lib lib64 bin
-DOC "CUDNN library." )
+ NAMES libcudnn.so${__cudnn_ver_suffix} libcudnn${__cudnn_ver_suffix}.dylib ${__cudnn_lib_win_name}
+ PATHS $ENV{LD_LIBRARY_PATH} ${__libpath_cudart} ${CUDNN_ROOT_DIR} ${PC_CUDNN_LIBRARY_DIRS} ${CMAKE_INSTALL_PREFIX}
+ PATH_SUFFIXES lib lib64 bin
+ DOC "CUDNN library."
+)
if(CUDNN_LIBRARY)
- if (CUDA_VERBOSE)
+ if(CUDA_VERBOSE)
message(STATUS "CUDNN is available!")
message(STATUS "CUDNN_LIBRARY: ${CUDNN_LIBRARY}")
- endif ()
+ endif()
set(CUDNN_AVAIL ON)
else()
message(STATUS "CUDNN is NOT Available")
@@ -86,19 +77,19 @@ set(LAMP_LABEL_LINK "https://drive.google.com/uc?id=1hPcKvKgKz0fqEo0cNAXH7roElet
set(LAMP_LABEL_HASH e9f45efb02f2a9aa8ac27b3d5c164905)
find_program(GDOWN_AVAIL "gdown")
-if (NOT GDOWN_AVAIL)
+if(NOT GDOWN_AVAIL)
message(STATUS "gdown: command not found. External files could not be downloaded.")
endif()
set(PATH "${CMAKE_CURRENT_SOURCE_DIR}/data")
-if (NOT EXISTS "${PATH}")
+if(NOT EXISTS "${PATH}")
execute_process(COMMAND mkdir -p ${PATH})
endif()
set(FILE "${PATH}/mb2-ssd-lite-tlr.onnx")
message(STATUS "Checking and downloading mb2-ssd-lite-tlr.onnx")
-if (EXISTS "${FILE}")
+if(EXISTS "${FILE}")
file(MD5 "${FILE}" EXISTING_FILE_HASH)
- if (NOT "${PRETRAINED_MODEL_HASH}" EQUAL "${EXISTING_FILE_HASH}")
+ if(NOT "${PRETRAINED_MODEL_HASH}" EQUAL "${EXISTING_FILE_HASH}")
message(STATUS "... file hash changed. Downloading now ...")
execute_process(COMMAND gdown --quiet "${PRETRAINED_MODEL_LINK}" -O ${PATH}/mb2-ssd-lite-tlr.onnx)
endif()
@@ -109,9 +100,9 @@ endif()
set(FILE "${PATH}/voc_labels_tl.txt")
message(STATUS "Checking and downloading voc_labels_tl.txt")
-if (EXISTS "${FILE}")
+if(EXISTS "${FILE}")
file(MD5 "${FILE}" EXISTING_FILE_HASH)
- if (NOT "${LAMP_LABEL_HASH}" EQUAL "${EXISTING_FILE_HASH}")
+ if(NOT "${LAMP_LABEL_HASH}" EQUAL "${EXISTING_FILE_HASH}")
message(STATUS "... file does not exist. Downloading now ...")
execute_process(COMMAND gdown --quiet "${LAMP_LABEL_LINK}" -O ${PATH}/voc_labels_tl.txt)
endif()
diff --git a/perception/traffic_light_ssd_fine_detector/package.xml b/perception/traffic_light_ssd_fine_detector/package.xml
index 3c1288dc4b8cb..95ce29227b6ff 100644
--- a/perception/traffic_light_ssd_fine_detector/package.xml
+++ b/perception/traffic_light_ssd_fine_detector/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
cv_bridge
image_transport
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/perception/traffic_light_visualization/package.xml b/perception/traffic_light_visualization/package.xml
index b6ad969012d8e..f16ddba519894 100644
--- a/perception/traffic_light_visualization/package.xml
+++ b/perception/traffic_light_visualization/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
cv_bridge
image_transport
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_path_planner/package.xml b/planning/behavior_path_planner/package.xml
index de3b7f13d1d67..466546e7b9db5 100644
--- a/planning/behavior_path_planner/package.xml
+++ b/planning/behavior_path_planner/package.xml
@@ -13,6 +13,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
autoware_auto_planning_msgs
autoware_auto_vehicle_msgs
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/behavior_velocity_planner/package.xml b/planning/behavior_velocity_planner/package.xml
index 0a1d412d349c6..a1f86fdf19419 100644
--- a/planning/behavior_velocity_planner/package.xml
+++ b/planning/behavior_velocity_planner/package.xml
@@ -10,6 +10,8 @@
ament_cmake
eigen3_cmake_module
+ autoware_cmake
+
autoware_auto_mapping_msgs
autoware_auto_perception_msgs
autoware_auto_planning_msgs
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/costmap_generator/package.xml b/planning/costmap_generator/package.xml
index e288bffe9c061..289e2be0197cb 100644
--- a/planning/costmap_generator/package.xml
+++ b/planning/costmap_generator/package.xml
@@ -10,9 +10,10 @@
BSD-3-Clause
- ament_cmake
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_mapping_msgs
autoware_auto_perception_msgs
grid_map_ros
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/external_velocity_limit_selector/package.xml b/planning/external_velocity_limit_selector/package.xml
index 35b85287f5544..85f2274025ac9 100644
--- a/planning/external_velocity_limit_selector/package.xml
+++ b/planning/external_velocity_limit_selector/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
rclcpp
rclcpp_components
tier4_planning_msgs
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_planner/package.xml b/planning/freespace_planner/package.xml
index 5883b4ebdb642..2d588c78e34c2 100644
--- a/planning/freespace_planner/package.xml
+++ b/planning/freespace_planner/package.xml
@@ -13,6 +13,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_planning_msgs
freespace_planning_algorithms
geometry_msgs
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/freespace_planning_algorithms/package.xml b/planning/freespace_planning_algorithms/package.xml
index 10c5dd7e29a33..72fc9d5a0dc45 100644
--- a/planning/freespace_planning_algorithms/package.xml
+++ b/planning/freespace_planning_algorithms/package.xml
@@ -12,6 +12,8 @@
ament_cmake_auto
+ autoware_cmake
+
geometry_msgs
nav_msgs
std_msgs
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/mission_planner/package.xml b/planning/mission_planner/package.xml
index abdc2b0d20acc..94f7b9c3d8661 100644
--- a/planning/mission_planner/package.xml
+++ b/planning/mission_planner/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_planning_msgs
geometry_msgs
lanelet2_extension
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/motion_velocity_smoother/package.xml b/planning/motion_velocity_smoother/package.xml
index 6c748e40b4858..fbef021da0fed 100644
--- a/planning/motion_velocity_smoother/package.xml
+++ b/planning/motion_velocity_smoother/package.xml
@@ -12,6 +12,8 @@
ament_cmake_auto
eigen3_cmake_module
+ autoware_cmake
+
autoware_auto_planning_msgs
geometry_msgs
interpolation
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_avoidance_planner/package.xml b/planning/obstacle_avoidance_planner/package.xml
index 18811ed96146f..57f485d108ecc 100644
--- a/planning/obstacle_avoidance_planner/package.xml
+++ b/planning/obstacle_avoidance_planner/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
autoware_auto_planning_msgs
geometry_msgs
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/obstacle_stop_planner/package.xml b/planning/obstacle_stop_planner/package.xml
index f6af25fa25807..1a3ca90cef3d0 100644
--- a/planning/obstacle_stop_planner/package.xml
+++ b/planning/obstacle_stop_planner/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
autoware_auto_planning_msgs
diagnostic_msgs
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_error_monitor/package.xml b/planning/planning_error_monitor/package.xml
index e0353b9e8abe9..b70e2f319cd01 100644
--- a/planning/planning_error_monitor/package.xml
+++ b/planning/planning_error_monitor/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_planning_msgs
diagnostic_updater
geometry_msgs
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/planning_evaluator/package.xml b/planning/planning_evaluator/package.xml
index 536561981a0b0..f7e1d5c3480dd 100644
--- a/planning/planning_evaluator/package.xml
+++ b/planning/planning_evaluator/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_perception_msgs
autoware_auto_planning_msgs
diagnostic_msgs
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/route_handler/package.xml b/planning/route_handler/package.xml
index 9c720d38dff4b..d85cb5fee79b1 100644
--- a/planning/route_handler/package.xml
+++ b/planning/route_handler/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
ament_lint_auto
autoware_lint_common
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/scenario_selector/package.xml b/planning/scenario_selector/package.xml
index c2c5a395458d0..c0cefa6eef1be 100644
--- a/planning/scenario_selector/package.xml
+++ b/planning/scenario_selector/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_mapping_msgs
autoware_auto_planning_msgs
lanelet2_extension
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/planning/surround_obstacle_checker/package.xml b/planning/surround_obstacle_checker/package.xml
index 3619684216af2..5dfed9ddb19a7 100644
--- a/planning/surround_obstacle_checker/package.xml
+++ b/planning/surround_obstacle_checker/package.xml
@@ -10,6 +10,8 @@
ament_cmake
eigen3_cmake_module
+ autoware_cmake
+
autoware_auto_perception_msgs
autoware_auto_planning_msgs
diagnostic_msgs
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/geo_pos_conv/package.xml b/sensing/geo_pos_conv/package.xml
index 26e7278b79545..bee92e4c63dea 100644
--- a/sensing/geo_pos_conv/package.xml
+++ b/sensing/geo_pos_conv/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
rclcpp
ament_lint_auto
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/gnss_poser/package.xml b/sensing/gnss_poser/package.xml
index 779b149a63a62..e5fbaf575d28e 100644
--- a/sensing/gnss_poser/package.xml
+++ b/sensing/gnss_poser/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
geo_pos_conv
geographiclib
geometry_msgs
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/image_transport_decompressor/package.xml b/sensing/image_transport_decompressor/package.xml
index c38295bb53dbb..631e72d1c4294 100644
--- a/sensing/image_transport_decompressor/package.xml
+++ b/sensing/image_transport_decompressor/package.xml
@@ -18,6 +18,8 @@
ament_cmake_auto
+ autoware_cmake
+
cv_bridge
rclcpp
rclcpp_components
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/imu_corrector/package.xml b/sensing/imu_corrector/package.xml
index 71fece2622338..55da6110de396 100644
--- a/sensing/imu_corrector/package.xml
+++ b/sensing/imu_corrector/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
rclcpp
rclcpp_components
sensor_msgs
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/livox/livox_tag_filter/package.xml b/sensing/livox/livox_tag_filter/package.xml
index e1ccee7c014e1..50f80e4c5b47d 100644
--- a/sensing/livox/livox_tag_filter/package.xml
+++ b/sensing/livox/livox_tag_filter/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
libpcl-all-dev
pcl_conversions
rclcpp
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/pointcloud_preprocessor/package.xml b/sensing/pointcloud_preprocessor/package.xml
index b6390fab335a8..0bb220ba3c015 100644
--- a/sensing/pointcloud_preprocessor/package.xml
+++ b/sensing/pointcloud_preprocessor/package.xml
@@ -15,6 +15,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_vehicle_msgs
autoware_point_types
cv_bridge
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/probabilistic_occupancy_grid_map/package.xml b/sensing/probabilistic_occupancy_grid_map/package.xml
index b10a9a12d57af..127380427bb2f 100644
--- a/sensing/probabilistic_occupancy_grid_map/package.xml
+++ b/sensing/probabilistic_occupancy_grid_map/package.xml
@@ -11,6 +11,8 @@
ament_cmake_auto
+ autoware_cmake
+
eigen3_cmake_module
laser_geometry
message_filters
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/sensing/tier4_pcl_extensions/package.xml b/sensing/tier4_pcl_extensions/package.xml
index 099f3c833c55b..8bcb5031e7c73 100644
--- a/sensing/tier4_pcl_extensions/package.xml
+++ b/sensing/tier4_pcl_extensions/package.xml
@@ -12,7 +12,9 @@
eigen3_cmake_module
+ autoware_cmake
eigen
+
eigen
libpcl-all-dev
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/dummy_perception_publisher/package.xml b/simulator/dummy_perception_publisher/package.xml
index febaf4f45b1d0..e7ce4dc99c433 100644
--- a/simulator/dummy_perception_publisher/package.xml
+++ b/simulator/dummy_perception_publisher/package.xml
@@ -9,6 +9,7 @@
ament_cmake_auto
+ autoware_cmake
rosidl_default_generators
rosidl_default_runtime
diff --git a/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp b/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp
index 27105829510bf..6c964625a3e69 100644
--- a/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp
+++ b/simulator/dummy_perception_publisher/src/pointcloud_creator.cpp
@@ -30,7 +30,7 @@ pcl::PointXYZ getPointWrtBaseLink(
{
const auto p_wrt_base = tf_base_link2moved_object(tf2::Vector3(x, y, z));
return pcl::PointXYZ(p_wrt_base.x(), p_wrt_base.y(), p_wrt_base.z());
-};
+}
void ObjectCentricPointCloudCreator::create_object_pointcloud(
const ObjectInfo & obj_info, const tf2::Transform & tf_base_link2map,
diff --git a/simulator/fault_injection/CMakeLists.txt b/simulator/fault_injection/CMakeLists.txt
index d021ab90760b0..7b4b2ef56e550 100644
--- a/simulator/fault_injection/CMakeLists.txt
+++ b/simulator/fault_injection/CMakeLists.txt
@@ -1,22 +1,9 @@
cmake_minimum_required(VERSION 3.5)
project(fault_injection)
-## 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()
-## Dependencies
-find_package(ament_cmake_auto REQUIRED)
-ament_auto_find_build_dependencies()
-
-## Targets
ament_auto_add_library(fault_injection_node_component SHARED
src/fault_injection_node/fault_injection_node.cpp
)
@@ -33,12 +20,7 @@ rclcpp_components_register_node(fault_injection_node_component
EXECUTABLE fault_injection_node
)
-## Tests
if(BUILD_TESTING)
- # Linter
- find_package(ament_lint_auto REQUIRED)
- ament_lint_auto_find_test_dependencies()
-
# gtest
ament_add_gtest(test_fault_injection_node_component
test/src/main.cpp
@@ -50,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
@@ -69,7 +50,6 @@ if(BUILD_TESTING)
)
endif()
-## Package
ament_auto_package(
INSTALL_TO_SHARE
config
diff --git a/simulator/fault_injection/package.xml b/simulator/fault_injection/package.xml
index 72394431d1b0a..961a0af1e5854 100644
--- a/simulator/fault_injection/package.xml
+++ b/simulator/fault_injection/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
diagnostic_aggregator
diagnostic_msgs
diagnostic_updater
diff --git a/simulator/simple_planning_simulator/CMakeLists.txt b/simulator/simple_planning_simulator/CMakeLists.txt
index 8ca1510484b35..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
@@ -21,7 +18,6 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
src/simple_planning_simulator/vehicle_model/sim_model_delay_steer_acc_geared.cpp
)
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${tf2_INCLUDE_DIRS})
-autoware_set_compile_options(${PROJECT_NAME})
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-old-style-cast) # RCLCPP_ERROR_THROTTLE() has built-in old-style casts.
@@ -38,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
@@ -61,7 +52,4 @@ if(BUILD_TESTING)
endif()
endif()
-
-
-
ament_auto_package(INSTALL_TO_SHARE param launch)
diff --git a/simulator/simple_planning_simulator/package.xml b/simulator/simple_planning_simulator/package.xml
index 2a432563a9a4d..761aef0e322f2 100644
--- a/simulator/simple_planning_simulator/package.xml
+++ b/simulator/simple_planning_simulator/package.xml
@@ -8,7 +8,8 @@
Apache License 2.0
ament_cmake_auto
- autoware_auto_cmake
+
+ autoware_cmake
autoware_auto_common
autoware_auto_control_msgs
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/ad_service_state_monitor/package.xml b/system/ad_service_state_monitor/package.xml
index 21f04d46eab5b..56d48546f35c8 100644
--- a/system/ad_service_state_monitor/package.xml
+++ b/system/ad_service_state_monitor/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_control_msgs
autoware_auto_planning_msgs
autoware_auto_system_msgs
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/default_ad_api/package.xml b/system/default_ad_api/package.xml
index 3f0fd55896a98..0bb71303d5466 100644
--- a/system/default_ad_api/package.xml
+++ b/system/default_ad_api/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_ad_api_msgs
component_interface_utils
rclcpp
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_diag_publisher/package.xml b/system/dummy_diag_publisher/package.xml
index 9f9646feb8f9f..e466727a583d9 100644
--- a/system/dummy_diag_publisher/package.xml
+++ b/system/dummy_diag_publisher/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
diagnostic_updater
rclcpp
rclcpp_components
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/dummy_infrastructure/package.xml b/system/dummy_infrastructure/package.xml
index 07cac07a802af..bc1fad3a8e339 100644
--- a/system/dummy_infrastructure/package.xml
+++ b/system/dummy_infrastructure/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
rclcpp
rclcpp_components
tier4_v2x_msgs
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/emergency_handler/package.xml b/system/emergency_handler/package.xml
index 70bef05ebb225..588421d013808 100644
--- a/system/emergency_handler/package.xml
+++ b/system/emergency_handler/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_control_msgs
autoware_auto_system_msgs
autoware_auto_vehicle_msgs
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_error_monitor/package.xml b/system/system_error_monitor/package.xml
index efc96edf09a23..d98b62051d216 100644
--- a/system/system_error_monitor/package.xml
+++ b/system/system_error_monitor/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_system_msgs
autoware_auto_vehicle_msgs
diagnostic_msgs
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/system_monitor/package.xml b/system/system_monitor/package.xml
index 628446c3f2951..8cca9d2c71545 100644
--- a/system/system_monitor/package.xml
+++ b/system/system_monitor/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
diagnostic_msgs
diagnostic_updater
fmt
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/topic_state_monitor/package.xml b/system/topic_state_monitor/package.xml
index 8af15c32e28cc..13c182cc715ee 100644
--- a/system/topic_state_monitor/package.xml
+++ b/system/topic_state_monitor/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
ament_index_cpp
diagnostic_updater
rclcpp
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/system/velodyne_monitor/package.xml b/system/velodyne_monitor/package.xml
index b08eb8d00e279..9c6683511c2ce 100644
--- a/system/velodyne_monitor/package.xml
+++ b/system/velodyne_monitor/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
crypto++
diagnostic_msgs
diagnostic_updater
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/accel_brake_map_calibrator/accel_brake_map_calibrator/package.xml b/vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/package.xml
index 66e66f968ad34..472d492c52908 100644
--- a/vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/package.xml
+++ b/vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_vehicle_msgs
diagnostic_updater
geometry_msgs
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/external_cmd_converter/package.xml b/vehicle/external_cmd_converter/package.xml
index f5f6f2f7578ee..0e8962f5b7bf8 100644
--- a/vehicle/external_cmd_converter/package.xml
+++ b/vehicle/external_cmd_converter/package.xml
@@ -11,6 +11,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_control_msgs
autoware_auto_vehicle_msgs
diagnostic_updater
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/raw_vehicle_cmd_converter/package.xml b/vehicle/raw_vehicle_cmd_converter/package.xml
index 022a3e1e88cbd..b14b00c9d3963 100644
--- a/vehicle/raw_vehicle_cmd_converter/package.xml
+++ b/vehicle/raw_vehicle_cmd_converter/package.xml
@@ -12,6 +12,8 @@
ament_cmake_auto
+ autoware_cmake
+
autoware_auto_control_msgs
autoware_auto_vehicle_msgs
geometry_msgs
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
diff --git a/vehicle/vehicle_info_util/package.xml b/vehicle/vehicle_info_util/package.xml
index f421bd3f21581..09a349be63e14 100644
--- a/vehicle/vehicle_info_util/package.xml
+++ b/vehicle/vehicle_info_util/package.xml
@@ -9,6 +9,8 @@
ament_cmake_auto
+ autoware_cmake
+
rclcpp
ament_lint_auto