Skip to content

Commit

Permalink
Add ${catkin_EXPORTED_TARGETS} dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-reynolds committed Jan 11, 2020
1 parent 2db99f3 commit fa93166
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions combined_robot_hw_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ if(CATKIN_ENABLE_TESTING)
src/my_robot_hw_3.cpp
src/my_robot_hw_4.cpp
)
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})

add_executable(combined_robot_hw_dummy_app EXCLUDE_FROM_ALL src/dummy_app.cpp)
Expand All @@ -48,7 +47,7 @@ if(CATKIN_ENABLE_TESTING)
test/cm_test.test
test/cm_test.cpp
)
add_dependencies(combined_robot_hw_cm_test combined_robot_hw_dummy_app)
add_dependencies(combined_robot_hw_cm_test combined_robot_hw_dummy_app ${catkin_EXPORTED_TARGETS})
target_link_libraries(combined_robot_hw_cm_test ${PROJECT_NAME} ${catkin_LIBRARIES})
endif()

Expand Down
2 changes: 2 additions & 0 deletions controller_manager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ if(CATKIN_ENABLE_TESTING)
test/hwi_switch_test.test
test/hwi_switch_test.cpp
)
add_dependencies(${PROJECT_NAME}_hwi_switch_test ${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}_hwi_switch_test ${PROJECT_NAME} ${catkin_LIBRARIES})

add_rostest_gmock(${PROJECT_NAME}_hwi_update_test
test/hwi_update_test.test
test/hwi_update_test.cpp
)
add_dependencies(${PROJECT_NAME}_hwi_update_test ${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}_hwi_update_test ${PROJECT_NAME} ${catkin_LIBRARIES})
endif()

Expand Down
2 changes: 2 additions & 0 deletions controller_manager_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ if(CATKIN_ENABLE_TESTING)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})

add_executable(dummy_app EXCLUDE_FROM_ALL src/dummy_app.cpp)
add_dependencies(dummy_app ${catkin_EXPORTED_TARGETS})
target_link_libraries(dummy_app ${PROJECT_NAME} ${catkin_LIBRARIES})

add_executable(cm_test EXCLUDE_FROM_ALL test/cm_test.cpp)
add_dependencies(cm_test ${catkin_EXPORTED_TARGETS})
target_link_libraries(cm_test ${catkin_LIBRARIES} ${GTEST_LIBRARIES})

catkin_add_nosetests(test)
Expand Down

0 comments on commit fa93166

Please # to comment.