From fa93166c2c77163f661aa8da9b8eeb0cbed5d22d Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Sat, 11 Jan 2020 17:25:59 -0500 Subject: [PATCH] Add ${catkin_EXPORTED_TARGETS} dependencies --- combined_robot_hw_tests/CMakeLists.txt | 3 +-- controller_manager/CMakeLists.txt | 2 ++ controller_manager_tests/CMakeLists.txt | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/combined_robot_hw_tests/CMakeLists.txt b/combined_robot_hw_tests/CMakeLists.txt index 46402d29c..858b68e76 100644 --- a/combined_robot_hw_tests/CMakeLists.txt +++ b/combined_robot_hw_tests/CMakeLists.txt @@ -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) @@ -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() diff --git a/controller_manager/CMakeLists.txt b/controller_manager/CMakeLists.txt index 5052746db..eaeb26fb4 100644 --- a/controller_manager/CMakeLists.txt +++ b/controller_manager/CMakeLists.txt @@ -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() diff --git a/controller_manager_tests/CMakeLists.txt b/controller_manager_tests/CMakeLists.txt index 036aafc71..3165b9b5c 100644 --- a/controller_manager_tests/CMakeLists.txt +++ b/controller_manager_tests/CMakeLists.txt @@ -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)