From 15c6fb535d5c5b051f4ad9dc68e20c769b2293d7 Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Thu, 30 Sep 2021 18:18:30 -0400 Subject: [PATCH] rados: build minimally when "WITH_MGR" is off Minimize footprint of the MGR when WITH_MGR is off. Include the minimal in MON. Don't include any MGR tests. Signed-off-by: J. Eric Ivancich --- src/CMakeLists.txt | 4 +++- src/mon/CMakeLists.txt | 6 +++++- src/test/CMakeLists.txt | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bf18423a45b8..1cda11504a79 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -615,7 +615,9 @@ if(WITH_LIBRADOSSTRIPER) add_subdirectory(libradosstriper) endif() -add_subdirectory(mgr) +if(WITH_MGR) + add_subdirectory(mgr) +endif() set(librados_config_srcs librados-config.cc) diff --git a/src/mon/CMakeLists.txt b/src/mon/CMakeLists.txt index b4056fdb1ecd..7b237c01c2f8 100644 --- a/src/mon/CMakeLists.txt +++ b/src/mon/CMakeLists.txt @@ -24,7 +24,11 @@ set(lib_mon_srcs ../mds/MDSAuthCaps.cc ../mgr/mgr_commands.cc ../osd/OSDCap.cc - $) + ../mgr/MgrCap.cc) + +if(TARGET mgr_cap_obj) + list(APPEND lib_mon_srcs $) +endif() if(HAVE_GSSAPI) list(APPEND lib_mon_srcs diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 70b814c9ce20..985c9b6d4e8b 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -64,7 +64,9 @@ if(NOT WIN32) add_subdirectory(libcephsqlite) add_subdirectory(client) add_subdirectory(mon) - add_subdirectory(mgr) + if(WITH_MGR) + add_subdirectory(mgr) + endif() add_subdirectory(msgr) add_subdirectory(neorados) add_subdirectory(objectstore) @@ -73,7 +75,7 @@ if(NOT WIN32) add_subdirectory(osd) add_subdirectory(osdc) add_subdirectory(immutable_object_cache) -endif() +endif(NOT WIN32) if(WITH_RADOSGW) set(rgw_libs rgw_a) -- 2.47.3