* dbstore also has tracing dependencies and missing linking for libraries
* use `using` keyword in common/tracer.cc to silence unused method
warnings
* log building of external project jaegertracing, opentracing into build
file, (done to reduce external project build verbosity)
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
INSTALL_COMMAND ${install_cmd}
DEPENDS ${dependencies}
BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/external/lib/libjaegertracing.so
- )
+ LOG_BUILD ON)
set_library_properties_for_external_project(opentracing::libopentracing
opentracing)
BUILD_COMMAND ${make_cmd}
INSTALL_COMMAND ${install_cmd}
BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/external/lib/libopentracing.so
- )
+ LOG_BUILD ON)
endfunction()
add_subdirectory(store/dbstore)
list(APPEND librgw_common_srcs rgw_sal_dbstore.cc)
endif()
+if(WITH_JAEGER)
+ list(APPEND librgw_common_srcs rgw_tracer.cc)
+endif()
add_library(rgw_common STATIC ${librgw_common_srcs})
if(WITH_JAEGER)
add_dependencies(rgw_common jaeger-base)
+ target_link_libraries(rgw_common PUBLIC jaeger-base)
endif()
if(WITH_RADOSGW_DBSTORE)
add_library(dbstore_lib ${dbstore_srcs})
target_include_directories(dbstore_lib PUBLIC "${CMAKE_SOURCE_DIR}/src/fmt/include")
target_include_directories(dbstore_lib PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw")
-target_link_libraries(dbstore_lib PUBLIC spawn)
+set(link_targets spawn)
+if(WITH_JAEGER)
+ list(APPEND link_targets jaeger-base)
+endif()
+target_link_libraries(dbstore_lib PUBLIC ${link_targets})
set (CMAKE_LINK_LIBRARIES ${CMAKE_LINK_LIBRARIES} dbstore_lib)