Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / 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 add_executable(rados ${rados_srcs})
9 target_link_libraries(rados librados global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} radosstriper)
10 install(TARGETS rados DESTINATION bin)
11
12 if(WITH_TESTS)
13 add_executable(ceph_scratchtool scratchtool.c)
14 target_link_libraries(ceph_scratchtool librados global)
15 install(TARGETS ceph_scratchtool DESTINATION bin)
16
17 add_executable(ceph_scratchtoolpp scratchtoolpp.cc)
18 target_link_libraries(ceph_scratchtoolpp librados global)
19 install(TARGETS ceph_scratchtoolpp DESTINATION bin)
20
21 add_executable(ceph_radosacl radosacl.cc)
22 target_link_libraries(ceph_radosacl librados global)
23 install(TARGETS ceph_radosacl DESTINATION bin)
24
25 add_executable(ceph-osdomap-tool ceph_osdomap_tool.cc)
26 target_link_libraries(ceph-osdomap-tool os global Boost::program_options)
27 install(TARGETS ceph-osdomap-tool DESTINATION bin)
28
29 add_executable(ceph-monstore-tool
30   ceph_monstore_tool.cc
31   ../mgr/mgr_commands.cc)
32 target_link_libraries(ceph-monstore-tool os global Boost::program_options)
33 install(TARGETS ceph-monstore-tool DESTINATION bin)
34 install(PROGRAMS
35   ceph-monstore-update-crush.sh
36   DESTINATION ${CMAKE_INSTALL_LIBDIR}/ceph)
37 endif(WITH_TESTS)
38
39 add_executable(ceph-objectstore-tool
40   ceph_objectstore_tool.cc
41   rebuild_mondb.cc
42   RadosDump.cc)
43 target_link_libraries(ceph-objectstore-tool osd os global Boost::program_options ${CMAKE_DL_LIBS})
44 if(WITH_FUSE)
45   target_link_libraries(ceph-objectstore-tool fuse)
46 endif(WITH_FUSE)
47 install(TARGETS ceph-objectstore-tool DESTINATION bin)
48
49 if(WITH_LIBCEPHFS)
50 if(WITH_TESTS)
51   add_executable(ceph-client-debug ceph-client-debug.cc)
52   target_link_libraries(ceph-client-debug cephfs global client)
53   install(TARGETS ceph-client-debug DESTINATION bin)
54 endif(WITH_TESTS)
55 endif(WITH_LIBCEPHFS)
56
57 if(WITH_TESTS)
58 add_executable(ceph-kvstore-tool ceph_kvstore_tool.cc)
59 target_link_libraries(ceph-kvstore-tool os global)
60 install(TARGETS ceph-kvstore-tool DESTINATION bin)
61 endif(WITH_TESTS)
62
63 set(ceph_conf_srcs ceph_conf.cc)
64 add_executable(ceph-conf ${ceph_conf_srcs})
65 target_link_libraries(ceph-conf global)
66 install(TARGETS ceph-conf DESTINATION bin)
67
68 set(crushtool_srcs crushtool.cc)
69 add_executable(crushtool ${crushtool_srcs})
70 target_link_libraries(crushtool global)
71 install(TARGETS crushtool DESTINATION bin)
72
73 set(monmaptool_srcs monmaptool.cc)
74 add_executable(monmaptool ${monmaptool_srcs})
75 target_link_libraries(monmaptool global)
76 install(TARGETS monmaptool DESTINATION bin)
77
78 set(osdomaptool_srcs osdmaptool.cc)
79 add_executable(osdmaptool ${osdomaptool_srcs})
80 target_link_libraries(osdmaptool global)
81 install(TARGETS osdmaptool DESTINATION bin)
82
83 if(WITH_TESTS)
84 set(ceph_psim_srcs psim.cc)
85 add_executable(ceph_psim ${ceph_psim_srcs})
86 target_link_libraries(ceph_psim global)
87 install(TARGETS ceph_psim DESTINATION bin)
88 endif(WITH_TESTS)
89
90 set(ceph_authtool_srcs ceph_authtool.cc)
91 add_executable(ceph-authtool ${ceph_authtool_srcs})
92 target_link_libraries(ceph-authtool global ${EXTRALIBS} ${CRYPTO_LIBS})
93 install(TARGETS ceph-authtool DESTINATION bin)
94
95 if(WITH_CEPHFS)
96   add_subdirectory(cephfs)
97 endif(WITH_CEPHFS)
98
99 if(WITH_RBD)
100   add_subdirectory(rbd)
101   add_subdirectory(rbd_mirror)
102   if(LINUX)
103     add_subdirectory(rbd_nbd)
104   endif()
105   if(FREEBSD)
106     add_subdirectory(rbd_ggate)
107   endif()
108 endif(WITH_RBD)