From: Kefu Chai Date: Fri, 27 Jul 2018 09:02:03 +0000 (+0800) Subject: cmake: extract mgr into its own CMakeLists.txt X-Git-Tag: v14.0.1~752^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F23279%2Fhead;p=ceph.git cmake: extract mgr into its own CMakeLists.txt Signed-off-by: Kefu Chai --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ef1d8a10712b5..c2687d43d212a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -491,36 +491,9 @@ add_subdirectory(include) add_subdirectory(librados) add_subdirectory(libradosstriper) -if (WITH_MGR) - set(mgr_srcs - ceph_mgr.cc - mon/PGMap.cc - mgr/DaemonState.cc - mgr/DaemonServer.cc - mgr/ClusterState.cc - mgr/ActivePyModules.cc - mgr/DaemonHealthMetricCollector.cc - mgr/StandbyPyModules.cc - mgr/PyModule.cc - mgr/PyModuleRegistry.cc - mgr/PyModuleRunner.cc - mgr/PyFormatter.cc - mgr/PyOSDMap.cc - mgr/BaseMgrModule.cc - mgr/BaseMgrStandbyModule.cc - mgr/ActivePyModule.cc - mgr/MgrStandby.cc - mgr/Mgr.cc - mgr/Gil.cc - mgr/mgr_commands.cc) - add_executable(ceph-mgr ${mgr_srcs}) - target_include_directories(ceph-mgr SYSTEM PRIVATE "${PYTHON_INCLUDE_DIRS}") - target_link_libraries(ceph-mgr - osdc client heap_profiler - global-static ceph-common - Boost::python ${MGR_PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS}) - install(TARGETS ceph-mgr DESTINATION bin) -endif (WITH_MGR) +if(WITH_MGR) + add_subdirectory(mgr) +endif() set(librados_config_srcs librados-config.cc) diff --git a/src/mgr/CMakeLists.txt b/src/mgr/CMakeLists.txt new file mode 100644 index 0000000000000..a55fc3adb0ef4 --- /dev/null +++ b/src/mgr/CMakeLists.txt @@ -0,0 +1,28 @@ +set(mgr_srcs + ${CMAKE_SOURCE_DIR}/src/ceph_mgr.cc + ${CMAKE_SOURCE_DIR}/src/mon/PGMap.cc + ActivePyModule.cc + ActivePyModules.cc + BaseMgrModule.cc + BaseMgrStandbyModule.cc + ClusterState.cc + DaemonHealthMetricCollector.cc + DaemonServer.cc + DaemonState.cc + Gil.cc + Mgr.cc + MgrStandby.cc + PyFormatter.cc + PyModule.cc + PyModuleRegistry.cc + PyModuleRunner.cc + PyOSDMap.cc + StandbyPyModules.cc + mgr_commands.cc) +add_executable(ceph-mgr ${mgr_srcs}) +target_include_directories(ceph-mgr SYSTEM PRIVATE "${PYTHON_INCLUDE_DIRS}") +target_link_libraries(ceph-mgr + osdc client heap_profiler + global-static ceph-common + Boost::python ${MGR_PYTHON_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS}) +install(TARGETS ceph-mgr DESTINATION bin)