Fix unknown macro errors reported by cppcheck 1.90 (#1000)
It was complaining about an unknown macro RCLCPP_SMART_PTR_DEFINITIONS. Passing rclcpp include directories to cppcheck resolves the errors reported in rclcpp_action and rclcpp_lifecycle. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This commit is contained in:
parent
d48d4608e5
commit
e3949cb5ec
2 changed files with 4 additions and 0 deletions
|
@ -45,6 +45,8 @@ install(TARGETS
|
|||
|
||||
if(BUILD_TESTING)
|
||||
find_package(ament_lint_auto REQUIRED)
|
||||
# Give cppcheck hints about macro definitions coming from outside this package
|
||||
set(ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS ${rclcpp_INCLUDE_DIRS})
|
||||
ament_lint_auto_find_test_dependencies()
|
||||
|
||||
ament_add_gtest(test_lifecycle_node test/test_lifecycle_node.cpp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue