Skip to content

Commit 32db6c8

Browse files
authored
Merge branch 'main' into link_problems_of_grpc
2 parents 977ae71 + 7a9c609 commit 32db6c8

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Increment the:
1515

1616
## [Unreleased]
1717

18+
* [BUILD] Error out when building DLL without MSVC
19+
[#3438](https://github.com/open-telemetry/opentelemetry-cpp/pull/3438)
20+
1821
* [Metrics SDK] Use nostd::function_ref in AttributesHashMap
1922
[#3393](https://github.com/open-telemetry/opentelemetry-cpp/pull/3393)
2023

cmake/find-package-support-functions.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,6 @@ function(find_required_dependencies components_in)
140140
if(is_required)
141141
message(DEBUG "find_required_dependencies: calling find_dependency(${_dependency} ${OTEL_${_dependency}_SEARCH_MODE} )...")
142142
find_dependency(${_dependency} ${OTEL_${_dependency}_SEARCH_MODE})
143-
if(${_dependency}_FOUND AND DEFINED OTEL_${_dependency}_VERSION AND DEFINED ${_dependency}_VERSION)
144-
if(NOT ${_dependency}_VERSION VERSION_EQUAL ${OTEL_${_dependency}_VERSION})
145-
message(WARNING "find_required_dependencies: found ${_dependency} version ${${_dependency}_VERSION} which does not match the opentelemetry-cpp built with version ${OTEL_${_dependency}_VERSION}.")
146-
endif()
147-
endif()
148143
endif()
149144
endforeach()
150145
endfunction()

examples/otlp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ if(WITH_OTLP_HTTP)
115115
target_compile_definitions(example_otlp_instrumented_http
116116
PRIVATE OPENTELEMETRY_BUILD_IMPORT_DLL)
117117
target_link_libraries(example_otlp_instrumented_http
118-
opentelemetry-cpp::opentelemetry_cpp)
118+
PRIVATE opentelemetry-cpp::opentelemetry_cpp)
119119
else()
120120
target_link_libraries(
121121
example_otlp_instrumented_http

ext/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ if(WITH_HTTP_CLIENT_CURL)
55
add_subdirectory(http/client/curl)
66
endif()
77

8-
if(MSVC AND DEFINED OPENTELEMETRY_BUILD_DLL)
8+
if(DEFINED OPENTELEMETRY_BUILD_DLL)
99
add_subdirectory(dll)
1010
endif()

ext/src/dll/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Copyright The OpenTelemetry Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4+
if(NOT MSVC)
5+
message(
6+
FATAL_ERROR
7+
"The OpenTelemetry C++ SDK for Windows DLL is only supported on MSVC.")
8+
endif()
9+
410
set(OPENTELEMETRY_EXPORT_DEF
511
"${CMAKE_CURRENT_BINARY_DIR}/opentelemetry_cpp.def")
612

0 commit comments

Comments
 (0)