forked from Burgos/ros_comm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
96 lines (84 loc) · 2.31 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
cmake_minimum_required(VERSION 2.8.3)
project(test_roscpp)
if(NOT WIN32)
set_directory_properties(PROPERTIES COMPILE_OPTIONS "-Wall;-Wextra")
endif()
find_package(catkin REQUIRED COMPONENTS
message_generation roscpp rostest rosunit std_srvs
)
if(CATKIN_ENABLE_TESTING)
find_package(Boost REQUIRED COMPONENTS signals filesystem system)
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
# Testing message and service files. See comment below about subdirectory support.
add_message_files(
NOINSTALL
DIRECTORY test/msg
FILES
TestArray.msg
TestEmpty.msg
TestStringInt.msg
TestWithHeader.msg
)
add_service_files(
NOINSTALL
DIRECTORY test/srv
FILES
BadTestStringString.srv
TestStringString.srv
)
# Serialization testing message files.
add_message_files(
NOINSTALL
DIRECTORY test_serialization/msg
FILES
ArrayOfFixedLength.msg
ArrayOfVariableLength.msg
Constants.msg
CustomHeader.msg
EmbeddedExternal.msg
EmbeddedFixedLength.msg
EmbeddedVariableLength.msg
FixedLengthArrayOfExternal.msg
FixedLength.msg
FixedLengthStringArray.msg
HeaderNotFirstMember.msg
VariableLengthArrayOfExternal.msg
VariableLength.msg
VariableLengthStringArray.msg
WithDuration.msg
WithHeader.msg
WithMemberNamedHeaderThatIsNotAHeader.msg
WithTime.msg
)
# Performance testing message files. add_message_files() does not
# currently support being called from a subdirectory, so this is here
# for now.
add_message_files(
NOINSTALL
DIRECTORY perf/msg
FILES
LatencyMessage.msg
ThroughputMessage.msg
)
# Message files for testing the performance of serialization.
add_message_files(
NOINSTALL
DIRECTORY perf_serialization/msg
FILES
ChannelFloat32.msg
Point32.msg
PointCloud.msg
)
# dependencies std_msgs and rosgraph_msgs are needed by tests, but not by roscpp otherwise.
generate_messages(DEPENDENCIES rosgraph_msgs std_msgs)
endif()
catkin_package(
CATKIN_DEPENDS message_runtime rosconsole rosgraph_msgs std_msgs xmlrpcpp
)
if(CATKIN_ENABLE_TESTING)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
add_subdirectory(test)
add_subdirectory(perf)
add_subdirectory(test_serialization)
add_subdirectory(perf_serialization)
endif()