summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/opentracing-cpp/mocktracer/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/jaegertracing/opentracing-cpp/mocktracer/CMakeLists.txt
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/jaegertracing/opentracing-cpp/mocktracer/CMakeLists.txt52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/jaegertracing/opentracing-cpp/mocktracer/CMakeLists.txt b/src/jaegertracing/opentracing-cpp/mocktracer/CMakeLists.txt
new file mode 100644
index 000000000..9835fe3d7
--- /dev/null
+++ b/src/jaegertracing/opentracing-cpp/mocktracer/CMakeLists.txt
@@ -0,0 +1,52 @@
+include_directories(include)
+
+set(SRCS src/mock_span_context.cpp
+ src/mock_span.cpp
+ src/in_memory_recorder.cpp
+ src/json_recorder.cpp
+ src/base64.cpp
+ src/propagation.cpp
+ src/utility.cpp
+ src/json.cpp
+ src/tracer.cpp
+ src/tracer_factory.cpp)
+
+if (BUILD_SHARED_LIBS)
+ add_library(opentracing_mocktracer SHARED ${SRCS} src/dynamic_load.cpp)
+ target_include_directories(opentracing_mocktracer INTERFACE "$<INSTALL_INTERFACE:include/>")
+ set_target_properties(opentracing_mocktracer PROPERTIES VERSION ${OPENTRACING_VERSION_STRING}
+ SOVERSION ${OPENTRACING_VERSION_MAJOR})
+ target_link_libraries(opentracing_mocktracer PUBLIC opentracing)
+ target_compile_definitions(opentracing_mocktracer PRIVATE OPENTRACING_MOCK_TRACER_EXPORTS)
+ install(TARGETS opentracing_mocktracer
+ COMPONENT DIST
+ EXPORT OpenTracingTargets
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+
+
+endif()
+
+if (BUILD_STATIC_LIBS)
+ add_library(opentracing_mocktracer-static STATIC ${SRCS})
+ # Windows generates a lib and dll files for a shared library. using the same name will override the lib file generated by the shared target
+ if (NOT WIN32)
+ set_target_properties(opentracing_mocktracer-static PROPERTIES OUTPUT_NAME opentracing_mocktracer)
+ endif()
+ target_compile_definitions(opentracing_mocktracer-static PUBLIC OPENTRACING_MOCK_TRACER_STATIC)
+ target_include_directories(opentracing_mocktracer-static INTERFACE "$<INSTALL_INTERFACE:include/>")
+ target_link_libraries(opentracing_mocktracer-static opentracing-static)
+ install(TARGETS opentracing_mocktracer-static EXPORT OpenTracingTargets
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+endif()
+
+install(DIRECTORY include/opentracing DESTINATION include
+ FILES_MATCHING PATTERN "*.h")
+
+# ==============================================================================
+# Testing
+
+include(CTest)
+if(BUILD_TESTING)
+ add_subdirectory(test)
+endif()