]> git.proxmox.com Git - ceph.git/blob - ceph/src/tools/CMakeLists.txt
3c4cf2ecf74c1cfbf3ef33fde2de15b805ed444e
[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(WITH_TESTS)
20 add_executable(ceph_scratchtool scratchtool.c)
21 target_link_libraries(ceph_scratchtool librados global)
22 install(TARGETS ceph_scratchtool DESTINATION bin)
23
24 add_executable(ceph_scratchtoolpp scratchtoolpp.cc)
25 target_link_libraries(ceph_scratchtoolpp librados global)
26 install(TARGETS ceph_scratchtoolpp DESTINATION bin)
27
28 add_executable(ceph_radosacl radosacl.cc)
29 target_link_libraries(ceph_radosacl librados global)
30 install(TARGETS ceph_radosacl DESTINATION bin)
31
32 install(PROGRAMS
33 ceph-monstore-update-crush.sh
34 DESTINATION ${CMAKE_INSTALL_LIBDIR}/ceph)
35 endif(WITH_TESTS)
36
37 add_executable(ceph-osdomap-tool ceph_osdomap_tool.cc)
38 target_link_libraries(ceph-osdomap-tool os global Boost::program_options)
39 install(TARGETS ceph-osdomap-tool DESTINATION bin)
40
41 add_executable(ceph-monstore-tool
42 ceph_monstore_tool.cc
43 ../mgr/mgr_commands.cc)
44 target_link_libraries(ceph-monstore-tool os global Boost::program_options)
45 install(TARGETS ceph-monstore-tool DESTINATION bin)
46
47 add_executable(ceph-objectstore-tool
48 ceph_objectstore_tool.cc
49 rebuild_mondb.cc
50 RadosDump.cc)
51 target_link_libraries(ceph-objectstore-tool osd os global Boost::program_options ${CMAKE_DL_LIBS})
52 if(WITH_FUSE)
53 target_link_libraries(ceph-objectstore-tool FUSE::FUSE)
54 endif(WITH_FUSE)
55 install(TARGETS ceph-objectstore-tool DESTINATION bin)
56
57 if(WITH_LIBCEPHFS)
58 if(WITH_TESTS)
59 add_executable(ceph-client-debug ceph-client-debug.cc)
60 target_link_libraries(ceph-client-debug cephfs global client)
61 install(TARGETS ceph-client-debug DESTINATION bin)
62 endif(WITH_TESTS)
63 endif(WITH_LIBCEPHFS)
64
65 add_executable(ceph-kvstore-tool
66 kvstore_tool.cc
67 ceph_kvstore_tool.cc)
68 target_link_libraries(ceph-kvstore-tool os global)
69 install(TARGETS ceph-kvstore-tool DESTINATION bin)
70
71 set(ceph_conf_srcs ceph_conf.cc)
72 add_executable(ceph-conf ${ceph_conf_srcs})
73 target_link_libraries(ceph-conf global)
74 install(TARGETS ceph-conf DESTINATION bin)
75
76 set(crushtool_srcs crushtool.cc)
77 add_executable(crushtool ${crushtool_srcs})
78 target_link_libraries(crushtool global)
79 install(TARGETS crushtool DESTINATION bin)
80
81 set(monmaptool_srcs monmaptool.cc)
82 add_executable(monmaptool ${monmaptool_srcs})
83 target_link_libraries(monmaptool global)
84 install(TARGETS monmaptool DESTINATION bin)
85
86 set(osdomaptool_srcs osdmaptool.cc)
87 add_executable(osdmaptool ${osdomaptool_srcs})
88 target_link_libraries(osdmaptool global)
89 install(TARGETS osdmaptool DESTINATION bin)
90
91 set(ceph-diff-sorted_srcs ceph-diff-sorted.cc)
92 add_executable(ceph-diff-sorted ${ceph-diff-sorted_srcs})
93 install(TARGETS ceph-diff-sorted DESTINATION bin)
94
95 if(WITH_TESTS)
96 set(ceph_psim_srcs psim.cc)
97 add_executable(ceph_psim ${ceph_psim_srcs})
98 target_link_libraries(ceph_psim global)
99 install(TARGETS ceph_psim DESTINATION bin)
100 endif(WITH_TESTS)
101
102 set(ceph_authtool_srcs ceph_authtool.cc)
103 add_executable(ceph-authtool ${ceph_authtool_srcs})
104 target_link_libraries(ceph-authtool global ${EXTRALIBS} ${CRYPTO_LIBS})
105 install(TARGETS ceph-authtool DESTINATION bin)
106
107 if(WITH_TESTS)
108 set(ceph_dedup_tool_srcs ceph_dedup_tool.cc)
109 add_executable(ceph-dedup-tool ${ceph_dedup_tool_srcs})
110 target_link_libraries(ceph-dedup-tool librados global cls_cas_client)
111 install(TARGETS ceph-dedup-tool DESTINATION bin)
112 endif(WITH_TESTS)
113
114 if(WITH_CEPHFS)
115 add_subdirectory(cephfs)
116 endif(WITH_CEPHFS)
117
118 if(WITH_RBD)
119 add_subdirectory(rbd)
120 add_subdirectory(rbd_mirror)
121 if(LINUX)
122 add_subdirectory(rbd_nbd)
123 endif()
124 if(FREEBSD)
125 add_subdirectory(rbd_ggate)
126 endif()
127 endif(WITH_RBD)
128
129 if(WITH_SEASTAR)
130 add_subdirectory(crimson)
131 endif()
132
133 add_subdirectory(immutable_object_cache)
134 add_subdirectory(ceph-dencoder)