]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Isolate the absl flags to ceph-mon & ceph-nvmeof-monitor-client targets only
authorT K Chandra Hasan <t.k.chandra.hasan@ibm.com>
Thu, 30 Jan 2025 12:27:11 +0000 (17:57 +0530)
committerT K Chandra Hasan <t.k.chandra.hasan@ibm.com>
Thu, 30 Jan 2025 12:27:11 +0000 (17:57 +0530)
Fixes https://tracker.ceph.com/issues/69732

Signed-off-by: T K Chandra Hasan <t.k.chandra.hasan@ibm.com>
src/CMakeLists.txt

index 9cbe350b388a30cef718a1cc8aea2c2855ef35f1..c25e493da7a2bf52d978d32201ca2d00adc89b9d 100644 (file)
@@ -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