]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/librados/CMakeLists.txt
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / test / librados / CMakeLists.txt
CommitLineData
31f18b77 1# radostest
11fdf7f2
TL
2add_library(radostest_shared OBJECT test_shared.cc)
3target_include_directories(radostest_shared PRIVATE
4 $<TARGET_PROPERTY:GTest::GTest,INTERFACE_INCLUDE_DIRECTORIES>)
5
31f18b77 6add_library(radostest STATIC
11fdf7f2
TL
7 test_common.cc
8 TestCase.cc
9 test.cc
10 $<TARGET_OBJECTS:radostest_shared>)
11target_link_libraries(radostest PUBLIC
12 GTest::GTest
13 ceph-common
14 json_spirit
15 ${GSSAPI_LIBRARIES} ${OPENLDAP_LIBRARIES} ${EXTRALIBS})
16add_library(radostest-cxx STATIC
17 testcase_cxx.cc
18 test_cxx.cc
19 $<TARGET_OBJECTS:radostest_shared>)
20target_link_libraries(radostest-cxx PUBLIC
21 GTest::GTest
22 ceph-common)
7c673cae 23
7c673cae 24add_executable(ceph_test_rados_api_cmd
11fdf7f2 25 cmd.cc)
7c673cae 26target_link_libraries(ceph_test_rados_api_cmd
11fdf7f2
TL
27 librados ${UNITTEST_LIBS} radostest)
28add_executable(ceph_test_rados_api_cmd_pp
29 cmd_cxx.cc)
30target_link_libraries(ceph_test_rados_api_cmd_pp
31 librados ${UNITTEST_LIBS} radostest-cxx)
7c673cae 32
7c673cae 33add_executable(ceph_test_rados_api_io
11fdf7f2 34 io.cc)
7c673cae
FG
35target_link_libraries(ceph_test_rados_api_io
36 librados ${UNITTEST_LIBS} radostest)
11fdf7f2
TL
37add_executable(ceph_test_rados_api_io_pp
38 io_cxx.cc)
39target_link_libraries(ceph_test_rados_api_io_pp
40 librados ${UNITTEST_LIBS} radostest-cxx)
7c673cae 41
7c673cae 42add_executable(ceph_test_rados_api_c_write_operations
11fdf7f2 43 c_write_operations.cc)
7c673cae
FG
44target_link_libraries(ceph_test_rados_api_c_write_operations
45 librados ${UNITTEST_LIBS} radostest)
46
7c673cae 47add_executable(ceph_test_rados_api_c_read_operations
11fdf7f2 48 c_read_operations.cc)
7c673cae
FG
49target_link_libraries(ceph_test_rados_api_c_read_operations
50 librados ${UNITTEST_LIBS} radostest)
51
7c673cae 52add_executable(ceph_test_rados_api_aio
11fdf7f2 53 aio.cc)
7c673cae
FG
54target_link_libraries(ceph_test_rados_api_aio
55 librados ${UNITTEST_LIBS} radostest)
11fdf7f2
TL
56add_executable(ceph_test_rados_api_aio_pp
57 aio_cxx.cc)
58target_link_libraries(ceph_test_rados_api_aio_pp
59 librados ${UNITTEST_LIBS} radostest-cxx)
60
61add_executable(ceph_test_rados_api_asio asio.cc)
62target_link_libraries(ceph_test_rados_api_asio global
63 librados ${UNITTEST_LIBS})
64if(WITH_BOOST_CONTEXT)
65 target_link_libraries(ceph_test_rados_api_asio Boost::coroutine Boost::context)
66endif()
7c673cae 67
7c673cae
FG
68add_executable(ceph_test_rados_api_list
69 list.cc
11fdf7f2 70 $<TARGET_OBJECTS:unit-main>)
7c673cae 71target_link_libraries(ceph_test_rados_api_list
11fdf7f2 72 librados global ${UNITTEST_LIBS} radostest)
7c673cae 73
7c673cae 74add_executable(ceph_test_rados_api_pool
11fdf7f2 75 pool.cc)
7c673cae 76target_link_libraries(ceph_test_rados_api_pool
11fdf7f2 77 librados ${UNITTEST_LIBS} radostest)
7c673cae 78
7c673cae 79add_executable(ceph_test_rados_api_stat
11fdf7f2 80 stat.cc)
7c673cae 81target_link_libraries(ceph_test_rados_api_stat
11fdf7f2
TL
82 librados ${UNITTEST_LIBS} radostest)
83add_executable(ceph_test_rados_api_stat_pp
84 stat_cxx.cc)
85target_link_libraries(ceph_test_rados_api_stat_pp
86 librados ${UNITTEST_LIBS} radostest-cxx)
7c673cae 87
7c673cae 88add_executable(ceph_test_rados_api_watch_notify
11fdf7f2 89 watch_notify.cc)
7c673cae 90target_link_libraries(ceph_test_rados_api_watch_notify
11fdf7f2
TL
91 librados ${UNITTEST_LIBS} radostest)
92add_executable(ceph_test_rados_api_watch_notify_pp
93 watch_notify_cxx.cc)
94target_link_libraries(ceph_test_rados_api_watch_notify_pp
95 librados ${UNITTEST_LIBS} radostest-cxx)
7c673cae 96
7c673cae 97add_executable(ceph_test_rados_api_cls
11fdf7f2 98 cls.cc)
7c673cae 99target_link_libraries(ceph_test_rados_api_cls
11fdf7f2 100 librados ${UNITTEST_LIBS} radostest-cxx)
7c673cae 101
7c673cae
FG
102add_executable(ceph_test_rados_api_misc
103 misc.cc
11fdf7f2 104 $<TARGET_OBJECTS:unit-main>)
7c673cae 105target_link_libraries(ceph_test_rados_api_misc
11fdf7f2
TL
106 librados global ${UNITTEST_LIBS} radostest)
107add_executable(ceph_test_rados_api_misc_pp
108 misc_cxx.cc
109 $<TARGET_OBJECTS:unit-main>)
110target_link_libraries(ceph_test_rados_api_misc_pp
111 librados global ${UNITTEST_LIBS} radostest-cxx)
7c673cae 112
7c673cae 113add_executable(ceph_test_rados_api_lock
11fdf7f2 114 lock.cc)
7c673cae 115target_link_libraries(ceph_test_rados_api_lock
11fdf7f2
TL
116 librados ${UNITTEST_LIBS} radostest)
117add_executable(ceph_test_rados_api_lock_pp
118 lock_cxx.cc)
119target_link_libraries(ceph_test_rados_api_lock_pp
120 librados ${UNITTEST_LIBS} radostest-cxx)
7c673cae 121
224ce89b 122add_executable(ceph_test_rados_api_service
11fdf7f2 123 service.cc)
224ce89b 124target_link_libraries(ceph_test_rados_api_service
11fdf7f2
TL
125 librados global ${UNITTEST_LIBS} radostest)
126add_executable(ceph_test_rados_api_service_pp
127 service_cxx.cc)
128target_link_libraries(ceph_test_rados_api_service_pp
129 librados global ${UNITTEST_LIBS} radostest-cxx)
130
131add_executable(ceph_test_rados_api_tier_pp
132 tier_cxx.cc
133 $<TARGET_OBJECTS:unit-main>)
134target_link_libraries(ceph_test_rados_api_tier_pp
135 librados global ${UNITTEST_LIBS} Boost::system radostest-cxx)
7c673cae 136
7c673cae 137add_executable(ceph_test_rados_api_snapshots
11fdf7f2 138 snapshots.cc)
7c673cae 139target_link_libraries(ceph_test_rados_api_snapshots
11fdf7f2
TL
140 librados ${UNITTEST_LIBS} radostest)
141add_executable(ceph_test_rados_api_snapshots_pp
142 snapshots_cxx.cc)
143target_link_libraries(ceph_test_rados_api_snapshots_pp
144 librados ${UNITTEST_LIBS} radostest-cxx)
7c673cae
FG
145
146install(TARGETS
147 ceph_test_rados_api_aio
11fdf7f2
TL
148 ceph_test_rados_api_aio_pp
149 ceph_test_rados_api_asio
7c673cae
FG
150 ceph_test_rados_api_c_read_operations
151 ceph_test_rados_api_c_write_operations
152 ceph_test_rados_api_cmd
11fdf7f2 153 ceph_test_rados_api_cmd_pp
7c673cae 154 ceph_test_rados_api_io
11fdf7f2 155 ceph_test_rados_api_io_pp
7c673cae
FG
156 ceph_test_rados_api_list
157 ceph_test_rados_api_lock
11fdf7f2 158 ceph_test_rados_api_lock_pp
7c673cae 159 ceph_test_rados_api_misc
11fdf7f2 160 ceph_test_rados_api_misc_pp
7c673cae 161 ceph_test_rados_api_pool
224ce89b 162 ceph_test_rados_api_service
11fdf7f2 163 ceph_test_rados_api_service_pp
7c673cae 164 ceph_test_rados_api_snapshots
11fdf7f2 165 ceph_test_rados_api_snapshots_pp
7c673cae 166 ceph_test_rados_api_stat
11fdf7f2
TL
167 ceph_test_rados_api_stat_pp
168 ceph_test_rados_api_tier_pp
7c673cae 169 ceph_test_rados_api_watch_notify
11fdf7f2 170 ceph_test_rados_api_watch_notify_pp
7c673cae
FG
171 DESTINATION ${CMAKE_INSTALL_BINDIR})
172
173# unittest_librados
174add_executable(unittest_librados
175 librados.cc
176 )
11fdf7f2
TL
177add_ceph_unittest(unittest_librados)
178target_link_libraries(unittest_librados librados ${BLKID_LIBRARIES}
179 ${GSSAPI_LIBRARIES} ${OPENLDAP_LIBRARIES})
7c673cae
FG
180
181# unittest_librados_config
182add_executable(unittest_librados_config
183 librados_config.cc
184 )
11fdf7f2 185add_ceph_unittest(unittest_librados_config)
7c673cae
FG
186target_link_libraries(unittest_librados_config
187 librados
11fdf7f2 188 ${BLKID_LIBRARIES} ${GSSAPI_LIBRARIES} ${OPENLDAP_LIBRARIES})
7c673cae 189