]> git.proxmox.com Git - ceph.git/blame - ceph/src/tools/CMakeLists.txt
import ceph 16.2.7
[ceph.git] / ceph / src / tools / CMakeLists.txt
CommitLineData
7c673cae
FG
1set(rados_srcs
2 rados/rados.cc
3 RadosDump.cc
4 rados/RadosImport.cc
5 rados/PoolDump.cc
6 ${PROJECT_SOURCE_DIR}/src/common/util.cc
94b18763
FG
7 ${PROJECT_SOURCE_DIR}/src/common/obj_bencher.cc
8 ${PROJECT_SOURCE_DIR}/src/osd/ECUtil.cc)
7c673cae 9add_executable(rados ${rados_srcs})
11fdf7f2
TL
10
11target_link_libraries(rados librados global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
12if(WITH_LIBRADOSSTRIPER)
13 target_link_libraries(rados radosstriper)
14else()
15 target_link_libraries(rados cls_lock_client)
16endif()
7c673cae
FG
17install(TARGETS rados DESTINATION bin)
18
f67539c2
TL
19if(NOT WIN32)
20 set(neorados_srcs
21 neorados.cc)
22 add_executable(neorados ${neorados_srcs})
522d829b 23 target_link_libraries(neorados libneorados spawn fmt::fmt ${CMAKE_DL_LIBS})
f67539c2
TL
24 #install(TARGETS neorados DESTINATION bin)
25endif()
26
7c673cae
FG
27if(WITH_TESTS)
28add_executable(ceph_scratchtool scratchtool.c)
29target_link_libraries(ceph_scratchtool librados global)
30install(TARGETS ceph_scratchtool DESTINATION bin)
31
32add_executable(ceph_scratchtoolpp scratchtoolpp.cc)
33target_link_libraries(ceph_scratchtoolpp librados global)
34install(TARGETS ceph_scratchtoolpp DESTINATION bin)
35
36add_executable(ceph_radosacl radosacl.cc)
37target_link_libraries(ceph_radosacl librados global)
38install(TARGETS ceph_radosacl DESTINATION bin)
39
11fdf7f2
TL
40install(PROGRAMS
41 ceph-monstore-update-crush.sh
42 DESTINATION ${CMAKE_INSTALL_LIBDIR}/ceph)
43endif(WITH_TESTS)
44
7c673cae 45add_executable(ceph-osdomap-tool ceph_osdomap_tool.cc)
31f18b77 46target_link_libraries(ceph-osdomap-tool os global Boost::program_options)
7c673cae
FG
47install(TARGETS ceph-osdomap-tool DESTINATION bin)
48
3efd9988
FG
49add_executable(ceph-monstore-tool
50 ceph_monstore_tool.cc
a4b75251 51 ../auth/cephx/CephxKeyServer.cc
3efd9988 52 ../mgr/mgr_commands.cc)
31f18b77 53target_link_libraries(ceph-monstore-tool os global Boost::program_options)
7c673cae 54install(TARGETS ceph-monstore-tool DESTINATION bin)
7c673cae
FG
55
56add_executable(ceph-objectstore-tool
57 ceph_objectstore_tool.cc
58 rebuild_mondb.cc
59 RadosDump.cc)
31f18b77 60target_link_libraries(ceph-objectstore-tool osd os global Boost::program_options ${CMAKE_DL_LIBS})
7c673cae 61if(WITH_FUSE)
1911f103 62 target_link_libraries(ceph-objectstore-tool FUSE::FUSE)
7c673cae
FG
63endif(WITH_FUSE)
64install(TARGETS ceph-objectstore-tool DESTINATION bin)
65
66if(WITH_LIBCEPHFS)
67if(WITH_TESTS)
68 add_executable(ceph-client-debug ceph-client-debug.cc)
69 target_link_libraries(ceph-client-debug cephfs global client)
70 install(TARGETS ceph-client-debug DESTINATION bin)
71endif(WITH_TESTS)
72endif(WITH_LIBCEPHFS)
73
11fdf7f2
TL
74add_executable(ceph-kvstore-tool
75 kvstore_tool.cc
76 ceph_kvstore_tool.cc)
7c673cae
FG
77target_link_libraries(ceph-kvstore-tool os global)
78install(TARGETS ceph-kvstore-tool DESTINATION bin)
7c673cae
FG
79
80set(ceph_conf_srcs ceph_conf.cc)
81add_executable(ceph-conf ${ceph_conf_srcs})
82target_link_libraries(ceph-conf global)
83install(TARGETS ceph-conf DESTINATION bin)
84
85set(crushtool_srcs crushtool.cc)
86add_executable(crushtool ${crushtool_srcs})
87target_link_libraries(crushtool global)
88install(TARGETS crushtool DESTINATION bin)
89
90set(monmaptool_srcs monmaptool.cc)
91add_executable(monmaptool ${monmaptool_srcs})
92target_link_libraries(monmaptool global)
93install(TARGETS monmaptool DESTINATION bin)
94
95set(osdomaptool_srcs osdmaptool.cc)
96add_executable(osdmaptool ${osdomaptool_srcs})
97target_link_libraries(osdmaptool global)
98install(TARGETS osdmaptool DESTINATION bin)
99
e306af50
TL
100set(ceph-diff-sorted_srcs ceph-diff-sorted.cc)
101add_executable(ceph-diff-sorted ${ceph-diff-sorted_srcs})
adb31ebb
TL
102set_target_properties(ceph-diff-sorted PROPERTIES
103 SKIP_RPATH TRUE
104 INSTALL_RPATH "")
e306af50
TL
105install(TARGETS ceph-diff-sorted DESTINATION bin)
106
7c673cae
FG
107if(WITH_TESTS)
108set(ceph_psim_srcs psim.cc)
109add_executable(ceph_psim ${ceph_psim_srcs})
110target_link_libraries(ceph_psim global)
111install(TARGETS ceph_psim DESTINATION bin)
112endif(WITH_TESTS)
113
114set(ceph_authtool_srcs ceph_authtool.cc)
115add_executable(ceph-authtool ${ceph_authtool_srcs})
116target_link_libraries(ceph-authtool global ${EXTRALIBS} ${CRYPTO_LIBS})
117install(TARGETS ceph-authtool DESTINATION bin)
118
11fdf7f2 119if(WITH_TESTS)
9f95a23c
TL
120set(ceph_dedup_tool_srcs ceph_dedup_tool.cc)
121add_executable(ceph-dedup-tool ${ceph_dedup_tool_srcs})
f67539c2
TL
122target_link_libraries(ceph-dedup-tool
123 librados
124 global
125 cls_cas_client
126 cls_cas_internal)
9f95a23c 127install(TARGETS ceph-dedup-tool DESTINATION bin)
11fdf7f2
TL
128endif(WITH_TESTS)
129
7c673cae
FG
130if(WITH_CEPHFS)
131 add_subdirectory(cephfs)
f67539c2 132 add_subdirectory(cephfs_mirror)
7c673cae
FG
133endif(WITH_CEPHFS)
134
135if(WITH_RBD)
136 add_subdirectory(rbd)
137 add_subdirectory(rbd_mirror)
138 if(LINUX)
139 add_subdirectory(rbd_nbd)
140 endif()
f67539c2
TL
141 if(WIN32)
142 add_subdirectory(rbd_wnbd)
143 endif()
d2e6a577
FG
144 if(FREEBSD)
145 add_subdirectory(rbd_ggate)
146 endif()
7c673cae 147endif(WITH_RBD)
11fdf7f2 148
9f95a23c
TL
149if(WITH_SEASTAR)
150 add_subdirectory(crimson)
151endif()
152
153add_subdirectory(immutable_object_cache)
11fdf7f2 154add_subdirectory(ceph-dencoder)
f67539c2 155add_subdirectory(erasure-code)