From 3cd276ca670844e03369512c3ba41452e385fa98 Mon Sep 17 00:00:00 2001 From: Autumn60 Date: Thu, 20 Jun 2024 10:18:17 +0900 Subject: [PATCH] update template pkg files Signed-off-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