summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorDeepika Upadhyay <dupadhya@redhat.com>2022-02-04 21:53:48 +0100
committerOmri Zeneva <ozeneva@redhat.com>2022-05-17 10:38:01 +0200
commitbbaafcd32c8c35143f397b459b76cb380cb5f036 (patch)
tree358633a48e8375d5cd7b3a493747f9da85f54cb2 /src/CMakeLists.txt
parentcmake: include opentelemetry include directories (diff)
downloadceph-bbaafcd32c8c35143f397b459b76cb380cb5f036.tar.xz
ceph-bbaafcd32c8c35143f397b459b76cb380cb5f036.zip
cmake: create jaeger_base target for consuming tracing libraries
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 61a8616d5a7..89c53ea46eb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -406,9 +406,11 @@ if(WITH_JAEGER)
find_package(thrift 0.13.0 REQUIRED)
include(BuildOpentelemetry)
build_opentelemetry()
- set(jaeger_base opentelemetry::libopentelemetry thrift::libthrift)
- add_dependencies(common-objs ${jaeger_base})
- target_link_libraries(common-objs ${jaeger_base})
+ add_library(jaeger_base INTERFACE)
+ target_link_libraries(jaeger_base INTERFACE opentelemetry::libopentelemetry
+ thrift::libthrift)
+ add_dependencies(common-objs jaeger_base)
+ target_link_libraries(common-objs jaeger_base)
endif()
CHECK_C_COMPILER_FLAG("-fvar-tracking-assignments" HAS_VTA)
@@ -472,7 +474,7 @@ if(WITH_DPDK)
endif()
if(WITH_JAEGER)
- list(APPEND ceph_common_deps ${jaeger_base})
+ list(APPEND ceph_common_deps jaeger_base)
endif()
if(WIN32)
@@ -498,7 +500,10 @@ endif()
add_library(common STATIC ${ceph_common_objs})
target_link_libraries(common ${ceph_common_deps})
-add_dependencies(common legacy-option-headers ${jaeger_base})
+add_dependencies(common legacy-option-headers)
+if(WITH_JAEGER)
+add_dependencies(common jaeger_base)
+endif()
if (WIN32)
# Statically building ceph-common on Windows fails. We're temporarily
@@ -512,7 +517,13 @@ target_link_libraries(ceph-common ${ceph_common_deps})
if(ENABLE_COVERAGE)
target_link_libraries(ceph-common gcov)
endif(ENABLE_COVERAGE)
-add_dependencies(ceph-common legacy-option-headers ${jaeger_base})
+
+add_dependencies(ceph-common legacy-option-headers)
+
+if(WITH_JAEGER)
+add_dependencies(ceph-common jaeger_base)
+endif()
+
# appease dpkg-shlibdeps
set_target_properties(ceph-common PROPERTIES
SOVERSION 2