From 05d43d61ed162eea063cbd4c0ea19728d106b6b3 Mon Sep 17 00:00:00 2001 From: WenTao Ou Date: Sun, 24 Oct 2021 00:40:30 +0800 Subject: [PATCH] Export `ENABLE_LOGS_PREVIEW` and `ENABLE_METRICS_PREVIEW` (#1026) --- api/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/CMakeLists.txt b/api/CMakeLists.txt index 9b07a59b52..83f89db094 100644 --- a/api/CMakeLists.txt +++ b/api/CMakeLists.txt @@ -53,6 +53,14 @@ else() message("Building with nostd types...") endif() +if(WITH_METRICS_PREVIEW) + target_compile_definitions(opentelemetry_api INTERFACE ENABLE_METRICS_PREVIEW) +endif() + +if(WITH_LOGS_PREVIEW) + target_compile_definitions(opentelemetry_api INTERFACE ENABLE_LOGS_PREVIEW) +endif() + if(CORE_RUNTIME_LIBS) target_link_libraries(opentelemetry_api INTERFACE ${CORE_RUNTIME_LIBS}) endif()