BuildRequires: xmlstarlet
BuildRequires: nasm
BuildRequires: lua-devel
+%if 0%{with seastar} || 0%{with jaeger}
+BuildRequires: yaml-cpp-devel >= 0.6
+%endif
%if 0%{with amqp_endpoint}
BuildRequires: librabbitmq-devel
%endif
BuildRequires: nlohmann_json-devel
%endif
BuildRequires: libevent-devel
-BuildRequires: yaml-cpp-devel
%endif
%if 0%{with system_pmdk}
BuildRequires: libpmem-devel
BuildRequires: protobuf-devel
BuildRequires: ragel
BuildRequires: systemtap-sdt-devel
-BuildRequires: yaml-cpp-devel
%if 0%{?fedora}
BuildRequires: libubsan
BuildRequires: libasan
build_opentracing()
include(Buildthrift)
build_thrift()
- if(NOT yaml-cpp_FOUND)
- include(Buildyaml-cpp)
- build_yamlcpp()
- add_library(yaml-cpp::yaml-cpp SHARED IMPORTED)
- add_dependencies(yaml-cpp::yaml-cpp yaml-cpp)
- set_library_properties_for_external_project(yaml-cpp::yaml-cpp yaml-cpp)
- list(APPEND dependencies "yaml-cpp")
- endif()
if(CMAKE_MAKE_PROGRAM MATCHES "make")
# try to inherit command line arguments passed by parent "make" job
+++ /dev/null
-function(build_yamlcpp)
- set(yaml-cpp_DOWNLOAD_DIR "${CMAKE_SOURCE_DIR}/src/jaegertracing")
- set(yaml-cpp_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/jaegertracing/yaml-cpp")
- set(yaml-cpp_BINARY_DIR "${CMAKE_BINARY_DIR}/external/yaml-cpp")
-
- set(yaml-cpp_CMAKE_ARGS -DBUILD_SHARED_LIBS=ON
- -DYAML_CPP_BUILD_TESTS=OFF
- -DYAML_CPP_BUILD_CONTRIB=OFF
- -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/external
- -DCMAKE_INSTALL_RPATH=${CMAKE_BINARY_DIR}/external/lib
- -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE
- -DCMAKE_INSTALL_LIBDIR=${CMAKE_BINARY_DIR}/external/lib
- -DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/external)
-
- if(CMAKE_MAKE_PROGRAM MATCHES "make")
- # try to inherit command line arguments passed by parent "make" job
- set(make_cmd $(MAKE) yaml-cpp)
- else()
- set(make_cmd ${CMAKE_COMMAND} --build <BINARY_DIR> --target yaml-cpp)
- endif()
- set(install_cmd ${CMAKE_MAKE_PROGRAM} install)
-
- include(ExternalProject)
- ExternalProject_Add(yaml-cpp
- GIT_REPOSITORY "https://github.com/jbeder/yaml-cpp.git"
- GIT_TAG "yaml-cpp-0.6.2"
- UPDATE_COMMAND ""
- INSTALL_DIR "${CMAKE_BINARY_DIR}/external"
- DOWNLOAD_DIR ${yaml-cpp_DOWNLOAD_DIR}
- SOURCE_DIR ${yaml-cpp_SOURCE_DIR}
- PREFIX "${CMAKE_BINARY_DIR}/external/yaml-cpp"
- CMAKE_ARGS ${yaml-cpp_CMAKE_ARGS}
- BUILD_COMMAND ${make_cmd}
- INSTALL_COMMAND ${install_cmd}
- )
-endfunction()
add_dependencies(common-objs legacy-option-headers)
if(WITH_JAEGER)
- find_package(yaml-cpp 0.6.0)
- if(NOT yaml-cpp_FOUND)
- set(jaeger_libs ${CMAKE_BINARY_DIR}/external/lib/libyaml-cpp.so
- ${CMAKE_BINARY_DIR}/external/lib/libyaml-cpp.so.0.6
- ${CMAKE_BINARY_DIR}/external/lib/libyaml-cpp.so.0.6.2)
- #customize libjaeger.install
- execute_process(COMMAND bash -c "sed -i 's/#//' debian/libjaeger.install"
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
- execute_process(COMMAND bash -c "grep -q 'yaml-cpp' debian/libjaeger.install || echo 'usr/lib/libyaml-cpp.so.*' >> debian/libjaeger.install"
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
- endif()
- include(IncludeJaeger)
- add_library(jaeger-base INTERFACE)
- add_dependencies(common-objs
- yaml-cpp::yaml-cpp
+ include(BuildJaeger)
+ find_package(yaml-cpp 0.6.0 REQUIRED)
+ list(APPEND jaeger_base
opentracing::libopentracing
thrift::libthrift
jaegertracing::libjaegertracing)