diff --git a/uav_simulator/Utils/uav_utils/CMakeLists.txt b/uav_simulator/Utils/uav_utils/CMakeLists.txt index b9020061..884dc200 100644 --- a/uav_simulator/Utils/uav_utils/CMakeLists.txt +++ b/uav_simulator/Utils/uav_utils/CMakeLists.txt @@ -91,7 +91,9 @@ install(DIRECTORY include/${PROJECT_NAME}/ ############# ## Add gtest based cpp test target and link libraries -catkin_add_gtest(${PROJECT_NAME}-test src/${PROJECT_NAME}_test.cpp) +if(CATKIN_ENABLE_TESTING) + catkin_add_gtest(${PROJECT_NAME}-test src/${PROJECT_NAME}_test.cpp) +endif() if(TARGET ${PROJECT_NAME}-test) target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) endif()