Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RST-1554] test depends #30

Merged
merged 3 commits into from Nov 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
81 changes: 69 additions & 12 deletions fuse_constraints/CMakeLists.txt
@@ -1,13 +1,17 @@
cmake_minimum_required(VERSION 2.8.3)
project(fuse_constraints)

find_package(catkin REQUIRED COMPONENTS
set(build_depends
geometry_msgs
fuse_core
fuse_variables
roscpp
)

find_package(catkin REQUIRED COMPONENTS
${build_depends}
)

find_package(Ceres REQUIRED)
find_package(Eigen3 REQUIRED)

Expand All @@ -20,10 +24,7 @@ catkin_package(
${PROJECT_NAME}
${CERES_LIBRARIES}
CATKIN_DEPENDS
geometry_msgs
fuse_core
fuse_variables
roscpp
${build_depends}
)

###########
Expand All @@ -32,13 +33,6 @@ catkin_package(

add_compile_options(-std=c++14 -Wall -Werror)

include_directories(
include
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)

# fuse_constraints library
add_library(${PROJECT_NAME}
src/absolute_orientation_3d_stamped_constraint.cpp
Expand All @@ -54,6 +48,13 @@ add_library(${PROJECT_NAME}
add_dependencies(${PROJECT_NAME}
${catkin_EXPORTED_TARGETS}
)
target_include_directories(${PROJECT_NAME}
PUBLIC
include
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
${CERES_LIBRARIES}
Expand Down Expand Up @@ -94,6 +95,13 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_absolute_constraint
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_absolute_constraint
PRIVATE
include
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_absolute_constraint
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -107,6 +115,13 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_absolute_orientation_3d_stamped_constraint
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_absolute_orientation_3d_stamped_constraint
PRIVATE
include
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_absolute_orientation_3d_stamped_constraint
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -119,6 +134,13 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_absolute_orientation_3d_stamped_euler_constraint
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_absolute_orientation_3d_stamped_euler_constraint
PRIVATE
include
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_absolute_orientation_3d_stamped_euler_constraint
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -131,6 +153,13 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_absolute_pose_2d_stamped_constraint
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_absolute_pose_2d_stamped_constraint
PRIVATE
include
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_absolute_pose_2d_stamped_constraint
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -143,6 +172,13 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_absolute_pose_3d_stamped_constraint
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_absolute_pose_3d_stamped_constraint
PRIVATE
include
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_absolute_pose_3d_stamped_constraint
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -155,6 +191,13 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_relative_constraint
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_relative_constraint
PRIVATE
include
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_relative_constraint
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -168,6 +211,13 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_relative_pose_2d_stamped_constraint
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_relative_pose_2d_stamped_constraint
PRIVATE
include
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_relative_pose_2d_stamped_constraint
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -180,6 +230,13 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_relative_pose_3d_stamped_constraint
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_relative_pose_3d_stamped_constraint
PRIVATE
include
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_relative_pose_3d_stamped_constraint
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand Down
113 changes: 100 additions & 13 deletions fuse_core/CMakeLists.txt
@@ -1,9 +1,13 @@
cmake_minimum_required(VERSION 2.8.3)
project(fuse_core)

find_package(catkin REQUIRED COMPONENTS
set(build_depends
roscpp
)

find_package(catkin REQUIRED COMPONENTS
${build_depends}
)
find_package(Boost REQUIRED)
find_package(Ceres REQUIRED)
find_package(Eigen3 REQUIRED)
Expand All @@ -17,7 +21,7 @@ catkin_package(
${PROJECT_NAME}
${CERES_LIBRARIES}
CATKIN_DEPENDS
roscpp
${build_depends}
DEPENDS
Boost
)
Expand All @@ -28,14 +32,6 @@ catkin_package(

add_compile_options(-std=c++14 -Wall -Werror)

include_directories(
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)

## fuse_core library
add_library(${PROJECT_NAME}
src/async_motion_model.cpp
Expand All @@ -51,6 +47,14 @@ add_library(${PROJECT_NAME}
add_dependencies(${PROJECT_NAME}
${catkin_EXPORTED_TARGETS}
)
target_include_directories(${PROJECT_NAME}
PUBLIC
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
${CERES_LIBRARIES}
Expand Down Expand Up @@ -79,9 +83,6 @@ install(
if(CATKIN_ENABLE_TESTING)
find_package(roslint REQUIRED)
find_package(rostest REQUIRED)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)

# Lint tests
set(ROSLINT_CPP_OPTS "--filter=-build/c++11,-runtime/references")
Expand All @@ -96,6 +97,14 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_async_motion_model
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_async_motion_model
PRIVATE
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_async_motion_model
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -109,6 +118,14 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_async_publisher
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_async_publisher
PRIVATE
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_async_publisher
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -122,6 +139,14 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_async_sensor_model
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_async_sensor_model
PRIVATE
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_async_sensor_model
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -132,6 +157,17 @@ if(CATKIN_ENABLE_TESTING)
test/callback_wrapper.test
test/test_callback_wrapper.cpp
)
add_dependencies(test_callback_wrapper
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_callback_wrapper
PRIVATE
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_callback_wrapper
${catkin_LIBRARIES}
)
Expand All @@ -143,6 +179,15 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_constraint
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_constraint
PRIVATE
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_constraint
${PROJECT_NAME}
)
Expand All @@ -154,6 +199,14 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_message_buffer
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_message_buffer
PRIVATE
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_message_buffer
${catkin_LIBRARIES}
)
Expand All @@ -165,6 +218,14 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_timestamp_manager
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_timestamp_manager
PRIVATE
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_timestamp_manager
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -177,6 +238,15 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_transaction
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_transaction
PRIVATE
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_transaction
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -189,6 +259,14 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_uuid
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_uuid
PRIVATE
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_uuid
${PROJECT_NAME}
${catkin_LIBRARIES}
Expand All @@ -201,6 +279,15 @@ if(CATKIN_ENABLE_TESTING)
add_dependencies(test_variable
${catkin_EXPORTED_TARGETS}
)
target_include_directories(test_variable
PRIVATE
include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${EIGEN3_INCLUDE_DIRS}
)
target_link_libraries(test_variable
${PROJECT_NAME}
)
Expand Down
1 change: 0 additions & 1 deletion fuse_core/include/fuse_core/publisher.h
Expand Up @@ -38,7 +38,6 @@
#include <fuse_core/macros.h>
#include <fuse_core/transaction.h>
#include <fuse_core/variable.h>
#include <ros/ros.h>

#include <string>
#include <vector>
Expand Down