-DWITH_OTLP_FILE=ON -DWITH_EXAMPLES=ON is not compiling the file_metric_main.cc #3225
Labels
bug
Something isn't working
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
Describe your environment
Building opentlemetry-cpp with file exporter ON. Example code examples/otlp/file_metric_main.cc is not comipling.
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 copiled 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)
The text was updated successfully, but these errors were encountered: