From b3189d6824f8950ddb895a50dc17c242536f36d7 Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 30 Jun 2016 14:04:30 +0100 Subject: [PATCH] cmake: update for ceph-mgr Signed-off-by: John Spray --- CMakeLists.txt | 8 ++++++++ src/CMakeLists.txt | 20 ++++++++++++++++++++ src/mon/CMakeLists.txt | 1 + 3 files changed, 29 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c19e2463e7..aaaab4e4b20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -329,6 +329,14 @@ option(WITH_RADOSGW "Rados Gateway is enabled" ON) #option for CephFS option(WITH_CEPHFS "CephFS is enabled" ON) +#option for Mgr +option(WITH_MGR "ceph-mgr is enabled" ON) +if(WITH_MGR) + set(Python_ADDITIONAL_VERSIONS 2.7) + find_package(PythonLibs 2.7 REQUIRED) + find_package(Boost COMPONENTS python REQUIRED) +endif(WITH_MGR) + option(WITH_THREAD_SAFE_RES_QUERY "res_query is thread safe" OFF) if(WITH_THREAD_SAFE_RES_QUERY) set(HAVE_THREAD_SAFE_RES_QUERY 1 CACHE INTERNAL "Thread safe res_query supported.") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0d6586c8843..de1713c0ebb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -369,6 +369,7 @@ set(libcommon_files mon/MonCap.cc mon/MonClient.cc mon/MonMap.cc + mgr/MgrClient.cc msg/simple/Accepter.cc msg/DispatchQueue.cc msg/Message.cc @@ -513,6 +514,24 @@ add_subdirectory(include) add_subdirectory(librados) add_subdirectory(libradosstriper) +if (WITH_MGR) + set(mgr_srcs + ceph_mgr.cc + mgr/DaemonMetadata.cc + mgr/DaemonServer.cc + mgr/ClusterState.cc + mgr/PyModules.cc + mgr/PyFormatter.cc + mgr/PyState.cc + mgr/MgrPyModule.cc + mgr/Mgr.cc) + add_executable(ceph-mgr ${mgr_srcs} + $) + target_include_directories(ceph-mgr PRIVATE "${PYTHON_INCLUDE_DIRS}") + target_link_libraries(ceph-mgr mds osdc global + -lboost_python ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${TCMALLOC_LIBS}) +endif (WITH_MGR) + set(librados_config_srcs librados-config.cc) add_executable(librados-config ${librados_config_srcs}) @@ -842,6 +861,7 @@ add_subdirectory(brag) add_custom_target(vstart DEPENDS ceph-osd ceph-mon + ceph-mgr ceph-authtool ceph-conf monmaptool diff --git a/src/mon/CMakeLists.txt b/src/mon/CMakeLists.txt index 05980e18ff4..e901a0c26b0 100644 --- a/src/mon/CMakeLists.txt +++ b/src/mon/CMakeLists.txt @@ -11,6 +11,7 @@ set(lib_mon_srcs PaxosService.cc OSDMonitor.cc MDSMonitor.cc + MgrMonitor.cc MonmapMonitor.cc LogMonitor.cc AuthMonitor.cc -- 2.39.5