summaryrefslogtreecommitdiffstats
path: root/src/test/librados/CMakeLists.txt
blob: 33ac156f9d18c9b52972bd9dcc730c4fc9c1ee8c (plain)
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# radostest
add_library(libradostest_obj OBJECT test.cc)
target_include_directories(libradostest_obj PRIVATE
  $<TARGET_PROPERTY:GTest::GTest,INTERFACE_INCLUDE_DIRECTORIES>)
set(libradostest_srcs 
  test_common.cc
  TestCase.cc)
add_library(radostest STATIC
  ${libradostest_srcs}
  $<TARGET_OBJECTS:libradostest_obj>)
target_link_libraries(radostest
  GTest::GTest
  librados
  ceph-common
  json_spirit
  ${EXTRALIBS})


add_executable(ceph_test_rados_api_cmd
  cmd.cc)
target_link_libraries(ceph_test_rados_api_cmd
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_io
  io.cc)
target_link_libraries(ceph_test_rados_api_io
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_c_write_operations
  c_write_operations.cc)
target_link_libraries(ceph_test_rados_api_c_write_operations
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_c_read_operations
  c_read_operations.cc)
target_link_libraries(ceph_test_rados_api_c_read_operations
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_aio
  aio.cc)
target_link_libraries(ceph_test_rados_api_aio
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_asio asio.cc)
target_link_libraries(ceph_test_rados_api_asio global
  librados ${UNITTEST_LIBS})
if(WITH_BOOST_CONTEXT)
  target_link_libraries(ceph_test_rados_api_asio Boost::coroutine Boost::context)
endif()

add_executable(ceph_test_rados_api_list
  list.cc
  $<TARGET_OBJECTS:unit-main>)
target_link_libraries(ceph_test_rados_api_list
  librados global ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_pool
  pool.cc)
target_link_libraries(ceph_test_rados_api_pool
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_stat
  stat.cc)
target_link_libraries(ceph_test_rados_api_stat
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_watch_notify
  watch_notify.cc)
target_link_libraries(ceph_test_rados_api_watch_notify
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_cls
  cls.cc)
target_link_libraries(ceph_test_rados_api_cls
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_misc
  misc.cc
  $<TARGET_OBJECTS:unit-main>)
target_link_libraries(ceph_test_rados_api_misc
  librados global ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_lock
  lock.cc)
target_link_libraries(ceph_test_rados_api_lock
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_service
  service.cc)
target_link_libraries(ceph_test_rados_api_service
  librados global ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_tier
  tier.cc
  $<TARGET_OBJECTS:unit-main>)
target_link_libraries(ceph_test_rados_api_tier
  librados global ${UNITTEST_LIBS} Boost::system radostest)

add_executable(ceph_test_rados_api_snapshots
  snapshots.cc)
target_link_libraries(ceph_test_rados_api_snapshots
  librados ${UNITTEST_LIBS} radostest)

install(TARGETS
  ceph_test_rados_api_aio
  ceph_test_rados_api_asio
  ceph_test_rados_api_c_read_operations
  ceph_test_rados_api_c_write_operations
  ceph_test_rados_api_cmd
  ceph_test_rados_api_io
  ceph_test_rados_api_list
  ceph_test_rados_api_lock
  ceph_test_rados_api_misc
  ceph_test_rados_api_pool
  ceph_test_rados_api_service
  ceph_test_rados_api_snapshots
  ceph_test_rados_api_stat
  ceph_test_rados_api_tier
  ceph_test_rados_api_watch_notify
  DESTINATION ${CMAKE_INSTALL_BINDIR})

# unittest_librados
add_executable(unittest_librados
  librados.cc
  )
add_ceph_unittest(unittest_librados)
target_link_libraries(unittest_librados librados ${BLKID_LIBRARIES})

# unittest_librados_config
add_executable(unittest_librados_config
  librados_config.cc
  )
add_ceph_unittest(unittest_librados_config)
target_link_libraries(unittest_librados_config
  librados
  ${BLKID_LIBRARIES}
  )