-
Notifications
You must be signed in to change notification settings - Fork 500
Description
Describe your environment
Building opentlemetry-cpp with file exporter ON. Example code examples/otlp/file_metric_main.cc is not compiling.
Steps to reproduce
cmake -S . -B cmakebuilddir -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON -DWITH_OTLP_FILE=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DOPENTELEMETRY_INSTALL=ON -DWITH_EXAMPLES=ON
What is the expected behavior?
As -DWITH_OTLP_FILE and WITH_EXAMPLES are set to ON expected to compile the code examples/otlp/file_metric_main.cc
What is the actual behavior?
examples/otlp/file_metric_main.cc is compiled only when WITH_OTLP_GRPC OR WITH_OTLP_HTTP
Additional context
-- NA --
Patch to fix this:
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -3,7 +3,7 @@
add_subdirectory(common)
include_directories(common)
-if(WITH_OTLP_GRPC OR WITH_OTLP_HTTP)
+if(WITH_OTLP_GRPC OR WITH_OTLP_HTTP OR WITH_OTLP_FILE)
add_subdirectory(otlp)
endif()
if(WITH_OTLP_GRPC)