]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: extract mgr into its own CMakeLists.txt 23279/head
authorKefu Chai <kchai@redhat.com>
Fri, 27 Jul 2018 09:02:03 +0000 (17:02 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 27 Jul 2018 09:10:29 +0000 (17:10 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt
src/mgr/CMakeLists.txt [new file with mode: 0644]

index ef1d8a10712b5c41388eaecdddf4806d62b82339..c2687d43d212a9ae894ee6e510dfa7f0f225e4e9 100644 (file)
@@ -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 (file)
index 0000000..a55fc3a
--- /dev/null
@@ -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)