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