Skip to content

Commit

Permalink
[BUILD] Add a CMake option to disable shared libs (open-telemetry#3095)
Browse files Browse the repository at this point in the history
* Add a CMake option to disable shared libs

This option is useful to support platforms that do not support
dynamic libraries and `dlopen`.
  • Loading branch information
tobim authored Oct 21, 2024
1 parent b1488cd commit 7402ed9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ option(WITH_ASYNC_EXPORT_PREVIEW "Whether to enable async export" OFF)
option(WITH_METRICS_EXEMPLAR_PREVIEW
"Whether to enable exemplar within metrics" OFF)

option(OPENTELEMETRY_SKIP_DYNAMIC_LOADING_TESTS
"Whether to build test libraries that are always linked as shared libs"
OFF)

#
# Verify options dependencies
#
Expand Down
5 changes: 4 additions & 1 deletion api/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ add_subdirectory(metrics)
add_subdirectory(logs)
add_subdirectory(common)
add_subdirectory(baggage)
add_subdirectory(singleton)

if(NOT OPENTELEMETRY_SKIP_DYNAMIC_LOADING_TESTS)
add_subdirectory(singleton)
endif()
5 changes: 4 additions & 1 deletion examples/plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(load)
add_subdirectory(plugin)

if(NOT OPENTELEMETRY_SKIP_DYNAMIC_LOADING_TESTS)
add_subdirectory(plugin)
endif()

2 comments on commit 7402ed9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp sdk Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 7402ed9 Previous: 6445819 Ratio
BM_BaselineBuffer/2 13005115.985870361 ns/iter 3631833.205028761 ns/iter 3.58
BM_BaselineBuffer/4 12966158.390045166 ns/iter 3641838.045421027 ns/iter 3.56
BM_LockFreeBuffer/2 8045043.9453125 ns/iter 2648934.360108365 ns/iter 3.04
BM_LockFreeBuffer/4 10535614.490509033 ns/iter 3020559.3532202644 ns/iter 3.49

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp api Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 7402ed9 Previous: 6445819 Ratio
BM_NaiveSpinLockThrashing/4/process_time/real_time 1.6641592738604305 ms/iter 0.5845977264700584 ms/iter 2.85

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.