Skip to content

Commit

Permalink
cleanup cmakelists (#726)
Browse files Browse the repository at this point in the history
  • Loading branch information
Karsten1987 authored Apr 17, 2021
1 parent 5f77e8f commit e19b2f4
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 144 deletions.
95 changes: 46 additions & 49 deletions rosbag2_transport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,83 +76,80 @@ ament_export_targets(export_${PROJECT_NAME})
ament_export_dependencies(rosbag2_cpp rosbag2_compression shared_queues_vendor yaml_cpp_vendor)

function(create_tests_for_rmw_implementation)
rosbag2_transport_add_gmock(test_record_all
test/rosbag2_transport/test_record_all.cpp
# disable the following tests for connext
# due to slower discovery of nodes
set(SKIP_TEST "")
if(${rmw_implementation} MATCHES "rmw_connext(.*)_cpp")
set(SKIP_TEST "SKIP_TEST")
endif()

rosbag2_transport_add_gmock(test_play
src/rosbag2_transport/qos.cpp
test/rosbag2_transport/test_play.cpp
INCLUDE_DIRS $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/rosbag2_transport>
LINK_LIBS rosbag2_transport
AMENT_DEPS rosbag2_cpp rosbag2_storage test_msgs rosbag2_test_common)
AMENT_DEPS test_msgs rosbag2_test_common
${SKIP_TEST})

rosbag2_transport_add_gmock(test_record_all_no_discovery
test/rosbag2_transport/test_record_all_no_discovery.cpp
rosbag2_transport_add_gmock(test_play_loop
test/rosbag2_transport/test_play_loop.cpp
LINK_LIBS rosbag2_transport
AMENT_DEPS rosbag2_cpp rosbag2_storage test_msgs rosbag2_test_common)
AMENT_DEPS test_msgs rosbag2_test_common
${SKIP_TEST})

rosbag2_transport_add_gmock(test_play_publish_clock
test/rosbag2_transport/test_play_publish_clock.cpp
LINK_LIBS rosbag2_transport
AMENT_DEPS test_msgs rosbag2_test_common
${SKIP_TEST})

rosbag2_transport_add_gmock(test_play_timing
test/rosbag2_transport/test_play_timing.cpp
LINK_LIBS rosbag2_transport
AMENT_DEPS rosbag2_cpp rosbag2_storage test_msgs rosbag2_test_common)
AMENT_DEPS test_msgs rosbag2_test_common)

rosbag2_transport_add_gmock(test_play_topic_remap
test/rosbag2_transport/test_play_topic_remap.cpp
LINK_LIBS rosbag2_transport
AMENT_DEPS test_msgs rosbag2_test_common
${SKIP_TEST})

rosbag2_transport_add_gmock(test_qos
src/rosbag2_transport/qos.cpp
test/rosbag2_transport/test_qos.cpp
INCLUDE_DIRS
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/rosbag2_transport>
AMENT_DEPS
rclcpp
rosbag2_test_common
yaml_cpp_vendor)

rosbag2_transport_add_gmock(test_topic_filter
test/rosbag2_transport/test_topic_filter.cpp
INCLUDE_DIRS
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/rosbag2_transport>
LINK_LIBS rosbag2_transport)

# disable the following tests for connext
# due to slower discovery of nodes
set(SKIP_TEST "")
if(${rmw_implementation} MATCHES "rmw_connext(.*)_cpp")
set(SKIP_TEST "SKIP_TEST")
endif()
AMENT_DEPS rosbag2_test_common yaml_cpp_vendor)

rosbag2_transport_add_gmock(test_record
test/rosbag2_transport/test_record.cpp
AMENT_DEPS rosbag2_cpp rosbag2_storage test_msgs rosbag2_test_common
INCLUDE_DIRS $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/rosbag2_transport>
LINK_LIBS rosbag2_transport
${SKIP_TEST})

rosbag2_transport_add_gmock(test_record_regex
test/rosbag2_transport/test_record_regex.cpp
LINK_LIBS rosbag2_transport
AMENT_DEPS test_msgs rosbag2_test_common
${SKIP_TEST})

rosbag2_transport_add_gmock(test_play
src/rosbag2_transport/qos.cpp
test/rosbag2_transport/test_play.cpp
INCLUDE_DIRS $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/rosbag2_transport>
rosbag2_transport_add_gmock(test_record_all
test/rosbag2_transport/test_record_all.cpp
LINK_LIBS rosbag2_transport
AMENT_DEPS rosbag2_cpp rosbag2_storage test_msgs rosbag2_test_common
${SKIP_TEST})
AMENT_DEPS test_msgs rosbag2_test_common)

rosbag2_transport_add_gmock(test_play_loop
test/rosbag2_transport/test_play_loop.cpp
${SKIP_TEST}
rosbag2_transport_add_gmock(test_record_all_no_discovery
test/rosbag2_transport/test_record_all_no_discovery.cpp
LINK_LIBS rosbag2_transport
AMENT_DEPS rosbag2_cpp rosbag2_storage test_msgs rosbag2_test_common)
AMENT_DEPS test_msgs rosbag2_test_common)

rosbag2_transport_add_gmock(test_play_topic_remap
test/rosbag2_transport/test_play_topic_remap.cpp
${SKIP_TEST}
rosbag2_transport_add_gmock(test_record_regex
test/rosbag2_transport/test_record_regex.cpp
LINK_LIBS rosbag2_transport
AMENT_DEPS rosbag2_cpp rosbag2_storage test_msgs rosbag2_test_common)
AMENT_DEPS test_msgs rosbag2_test_common
${SKIP_TEST})

rosbag2_transport_add_gmock(test_play_publish_clock
test/rosbag2_transport/test_play_publish_clock.cpp
${SKIP_TEST}
LINK_LIBS rosbag2_transport
AMENT_DEPS rosbag2_cpp rosbag2_storage test_msgs rosbag2_test_common)
rosbag2_transport_add_gmock(test_topic_filter
test/rosbag2_transport/test_topic_filter.cpp
INCLUDE_DIRS
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/rosbag2_transport>
LINK_LIBS rosbag2_transport)
endfunction()

if(BUILD_TESTING)
Expand Down
95 changes: 0 additions & 95 deletions rosbag2_transport/test/rosbag2_transport/test_formatter.cpp

This file was deleted.

0 comments on commit e19b2f4

Please sign in to comment.