Skip to content

Commit 502f24a

Browse files
committed
[feat] add ament index cpp
1 parent 5dfa6a0 commit 502f24a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
<depend>eigen</depend>
2525
<exec_depend>rclpy</exec_depend>
2626

27-
<!-- linting test dependencies -->
2827
<test_depend>ament_lint_auto</test_depend>
2928
<test_depend>ament_lint_common</test_depend>
3029
<test_depend>ament_cmake_gtest</test_depend>
30+
<test_depend>ament_index_cpp</test_depend>
3131

3232
<export>
3333
<build_type>ament_cmake</build_type>

tests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ file(GLOB GTEST_SOURCE "*_gtest.cpp")
1616

1717
if(GTEST_SOURCE)
1818
find_package(ament_cmake_gtest REQUIRED)
19+
find_package(ament_index_cpp REQUIRED)
1920

2021
foreach(TEST_SOURCE ${GTEST_SOURCE})
2122
get_filename_component(TEST_NAME ${TEST_SOURCE} NAME_WE)
2223

2324
ament_add_gtest(${PROJECT_NAME}_${TEST_NAME} ${TEST_SOURCE})
2425
ament_target_dependencies(${PROJECT_NAME}_${TEST_NAME} ${PROJECT_DEPENDENCIES})
25-
target_link_libraries(${PROJECT_NAME}_${TEST_NAME} gtest_main ${PROJECT_NAME})
26+
target_link_libraries(${PROJECT_NAME}_${TEST_NAME} ament_index_cpp::ament_index_cpp gtest_main ${PROJECT_NAME})
2627
endforeach()
2728
endif()

0 commit comments

Comments
 (0)