From 0b53f7c67bd13666fbb2e3a1fc6afe2cdda1668c Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 27 Jul 2018 17:02:03 +0800 Subject: [PATCH] cmake: extract mgr into its own CMakeLists.txt Signed-off-by: Kefu Chai --- src/CMakeLists.txt | 33 +++------------------------------ src/mgr/CMakeLists.txt | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 30 deletions(-) create mode 100644 src/mgr/CMakeLists.txt 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) -- 2.47.3