From 8f77785d92cf925b6ec610b6f3b15a6d550b4b2c Mon Sep 17 00:00:00 2001 From: Autumn60 <37181352+Autumn60@users.noreply.github.com> Date: Thu, 20 Jun 2024 12:19:04 +0900 Subject: [PATCH] update template pkg files (#49) Signed-off-by: Autumn60 Co-authored-by: Autumn60 --- .template-interface-package/.CMakeLists.txt | 13 ++++++++++--- .template-interface-package/.package.xml | 6 +++++- .template-package/.CMakeLists.txt | 5 ++++- .template-package/.package.xml | 4 +++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.template-interface-package/.CMakeLists.txt b/.template-interface-package/.CMakeLists.txt index 6ce2865..fd207fe 100644 --- a/.template-interface-package/.CMakeLists.txt +++ b/.template-interface-package/.CMakeLists.txt @@ -3,17 +3,24 @@ project(__PACKAGE_NAME__) 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(rosidl_default_generators REQUIRED) +find_package(ament_cmake_auto REQUIRED) +ament_auto_find_build_dependencies() rosidl_generate_interfaces(${PROJECT_NAME} DEPENDENCIES ) -ament_package() \ No newline at end of file +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() +endif() + +ament_auto_package() \ No newline at end of file diff --git a/.template-interface-package/.package.xml b/.template-interface-package/.package.xml index 7b3ce3e..c7b2b47 100644 --- a/.template-interface-package/.package.xml +++ b/.template-interface-package/.package.xml @@ -8,9 +8,13 @@ Apache 2 - ament_cmake + ament_cmake_auto rosidl_default_generators + rosidl_default_runtime + + ament_lint_auto + rosidl_interface_packages diff --git a/.template-package/.CMakeLists.txt b/.template-package/.CMakeLists.txt index fbb663b..991fdd5 100644 --- a/.template-package/.CMakeLists.txt +++ b/.template-package/.CMakeLists.txt @@ -3,13 +3,16 @@ project(__PACKAGE_NAME__) 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(ament_cmake_auto REQUIRED) +ament_auto_find_build_dependencies() if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) diff --git a/.template-package/.package.xml b/.template-package/.package.xml index 540291d..d40545b 100644 --- a/.template-package/.package.xml +++ b/.template-package/.package.xml @@ -8,7 +8,9 @@ Apache 2 - ament_cmake + ament_cmake_auto + + ament_lint_auto ament_cmake