From 624640cbdf28fe481259d7aefa400e6916daace9 Mon Sep 17 00:00:00 2001 From: T K Chandra Hasan Date: Thu, 30 Jan 2025 17:57:11 +0530 Subject: [PATCH] Isolate the absl flags to ceph-mon & ceph-nvmeof-monitor-client targets only Fixes https://tracker.ceph.com/issues/69732 Signed-off-by: T K Chandra Hasan --- src/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9cbe350b388..c25e493da7a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -316,12 +316,6 @@ endif(WITH_BLKIN) if(WITH_JAEGER) find_package(thrift 0.13.0 REQUIRED) - - if(EXISTS "/etc/redhat-release" OR EXISTS "/etc/fedora-release") - # absl is installed as grpc build dependency on RPM based systems - add_definitions(-DHAVE_ABSEIL) - endif() - include(BuildOpentelemetry) build_opentelemetry() add_library(jaeger_base INTERFACE) @@ -993,6 +987,12 @@ if(WITH_NVMEOF_GATEWAY_MONITOR_CLIENT) nvmeof/NVMeofGwMonitorClient.cc) add_executable(ceph-nvmeof-monitor-client ${ceph_nvmeof_monitor_client_srcs}) add_dependencies(ceph-nvmeof-monitor-client ceph-common) + # absl is installed as grpc build dependency on RPM based systems + # Also isolate this flag to specific targets which needs this package + if(EXISTS "/etc/redhat-release" OR EXISTS "/etc/fedora-release") + target_compile_definitions(ceph-nvmeof-monitor-client PRIVATE HAVE_ABSEIL) + target_compile_definitions(ceph-mon PRIVATE HAVE_ABSEIL) + endif() target_link_libraries(ceph-nvmeof-monitor-client client mon -- 2.39.5