Skip to content

Commit

Permalink
Fix ament_lint_auto settings for cppcheck and uc
Browse files Browse the repository at this point in the history
  • Loading branch information
gleichdick committed Apr 12, 2021
1 parent d3fb3bd commit 9646a40
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
17 changes: 6 additions & 11 deletions tf2_geometry_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,14 @@ ament_auto_find_build_dependencies(REQUIRED ${required_dependencies})

if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
find_package(ament_lint_auto REQUIRED)
find_package(rclcpp REQUIRED)

# TODO(ros2/geometry2#259) Switch to ament_lint_auto once headers
# TODO(ros2/geometry2#259) Remove once headers
# are renamed to .hpp
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)

ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify(LANGUAGE "c++")
set(ament_cmake_uncrustify_ADDITIONAL_ARGS -l CPP)
set(ament_cmake_cppcheck_LANGUAGE c++)
ament_lint_auto_find_test_dependencies()

ament_add_gtest(test_tf2_geometry_msgs test/test_tf2_geometry_msgs.cpp)
if(TARGET test_tf2_geometry_msgs)
Expand Down
15 changes: 6 additions & 9 deletions tf2_kdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,15 @@ install(DIRECTORY include/${PROJECT_NAME}/

if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
find_package(ament_lint_auto REQUIRED)
find_package(rclcpp REQUIRED)
find_package(tf2_msgs REQUIRED)

# TODO(ros2/geometry2#259) Switch to ament_lint_auto once headers
# TODO(ros2/geometry2#259) Remove once headers
# are renamed to .hpp
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)

ament_cppcheck(LANGUAGE "c++")
ament_uncrustify(LANGUAGE "c++")
set(ament_cmake_uncrustify_ADDITIONAL_ARGS -l CPP)
set(ament_cmake_cppcheck_LANGUAGE c++)
ament_lint_auto_find_test_dependencies()

ament_add_gtest(test_kdl test/test_tf2_kdl.cpp)
target_include_directories(test_kdl PUBLIC
Expand Down

0 comments on commit 9646a40

Please sign in to comment.