Skip to content

Commit 98a4eaa

Browse files
committed
Fixes formatting
1 parent 0e2239f commit 98a4eaa

11 files changed

Lines changed: 124 additions & 90 deletions

File tree

CMakeLists.txt

Lines changed: 99 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
6060
endif()
6161

6262
otelcpp_option_flag(OTELCPP_WITH_ABI_VERSION_1 "ABI version 1" ON)
63-
otelcpp_option_flag(OTELCPP_WITH_ABI_VERSION_2 "EXPERIMENTAL: ABI version 2 preview" OFF)
63+
otelcpp_option_flag(OTELCPP_WITH_ABI_VERSION_2
64+
"EXPERIMENTAL: ABI version 2 preview" OFF)
6465

6566
set(_OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW_REQUESTED OFF)
6667
if(DEFINED OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW)
@@ -74,20 +75,21 @@ if(_OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW_REQUESTED
7475
AND NOT OTELCPP_WITH_ABI_VERSION_2)
7576
message(
7677
FATAL_ERROR
77-
"OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW requires OTELCPP_WITH_ABI_VERSION_2")
78+
"OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW requires OTELCPP_WITH_ABI_VERSION_2"
79+
)
7880
endif()
7981
unset(_OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW_REQUESTED)
8082

81-
8283
# Experimental: bound synchronous metric instruments (Counter, Histogram).
83-
# Requires OTELCPP_WITH_ABI_VERSION_2. Context-bearing bound operations, exemplar
84-
# parity, Gauge, and UpDownCounter bound support are follow-ups.
84+
# Requires OTELCPP_WITH_ABI_VERSION_2. Context-bearing bound operations,
85+
# exemplar parity, Gauge, and UpDownCounter bound support are follow-ups.
8586
otelcpp_dependent_option(
8687
OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW
8788
"EXPERIMENTAL: bound synchronous metric instruments preview" OFF
8889
"OTELCPP_WITH_ABI_VERSION_2" OFF)
8990

90-
otelcpp_option_flag(OTELCPP_WITH_CONFIGURATION "EXPERIMENTAL: YAML configuration file" OFF)
91+
otelcpp_option_flag(OTELCPP_WITH_CONFIGURATION
92+
"EXPERIMENTAL: YAML configuration file" OFF)
9193

9294
#
9395
# We do not want to have OTELCPP_WITH_ABI_VERSION = "1" or "2", and instead
@@ -111,7 +113,9 @@ if(OTELCPP_WITH_ABI_VERSION_1 AND OTELCPP_WITH_ABI_VERSION_2)
111113
# Only one ABI is supported in a build.
112114
#
113115
message(
114-
FATAL_ERROR "Set either OTELCPP_WITH_ABI_VERSION_1 or OTELCPP_WITH_ABI_VERSION_2, not both")
116+
FATAL_ERROR
117+
"Set either OTELCPP_WITH_ABI_VERSION_1 or OTELCPP_WITH_ABI_VERSION_2, not both"
118+
)
115119
endif()
116120

117121
if(OTELCPP_WITH_ABI_VERSION_2)
@@ -122,28 +126,30 @@ else()
122126
set(OPENTELEMETRY_ABI_VERSION_NO "${OPENTELEMETRY_ABI_VERSION_DEFAULT}")
123127
endif()
124128

125-
if(OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW AND NOT OTELCPP_WITH_ABI_VERSION_2)
129+
if(OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW
130+
AND NOT OTELCPP_WITH_ABI_VERSION_2)
126131
message(
127132
FATAL_ERROR
128-
"OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW requires OTELCPP_WITH_ABI_VERSION_2")
133+
"OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW requires OTELCPP_WITH_ABI_VERSION_2"
134+
)
129135
endif()
130136

131-
otelcpp_option_flag(OTELCPP_WITH_NO_DEPRECATED_CODE "Do not include deprecated code" OFF)
137+
otelcpp_option_flag(OTELCPP_WITH_NO_DEPRECATED_CODE
138+
"Do not include deprecated code" OFF)
132139

133-
otelcpp_option_variable(
134-
OTELCPP_WITH_STL "OFF" STRING
135-
"Which version of the Standard Library for C++ to use")
140+
otelcpp_option_variable(OTELCPP_WITH_STL "OFF" STRING
141+
"Which version of the Standard Library for C++ to use")
136142

137-
otelcpp_option_flag(OTELCPP_WITH_GSL
138-
"Whether to use Guidelines Support Library for C++ latest features" OFF)
143+
otelcpp_option_flag(
144+
OTELCPP_WITH_GSL
145+
"Whether to use Guidelines Support Library for C++ latest features" OFF)
139146

140147
set(OTELCPP_INSTALL_DEFAULT ON)
141148
if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
142149
set(OTELCPP_INSTALL_DEFAULT OFF)
143150
endif()
144151
otelcpp_option_flag(OTELCPP_INSTALL "Whether to install opentelemetry targets"
145-
${OTELCPP_INSTALL_DEFAULT})
146-
152+
${OTELCPP_INSTALL_DEFAULT})
147153

148154
if(NOT OTELCPP_WITH_STL STREQUAL "OFF")
149155
# These definitions are needed for test projects that do not link against
@@ -164,22 +170,24 @@ if(NOT OTELCPP_WITH_STL STREQUAL "OFF")
164170
endif()
165171
endif()
166172

167-
otelcpp_option_flag(OTELCPP_WITH_OTLP_RETRY_PREVIEW "Whether to enable retry functionality" ON)
173+
otelcpp_option_flag(OTELCPP_WITH_OTLP_RETRY_PREVIEW
174+
"Whether to enable retry functionality" ON)
168175

169176
otelcpp_option_flag(OTELCPP_WITH_OTLP_GRPC_SSL_MTLS_PREVIEW
170-
"Whether to enable mTLS support for gRPC" ON)
177+
"Whether to enable mTLS support for gRPC" ON)
171178

172-
otelcpp_option_flag(OTELCPP_WITH_OTLP_GRPC_CREDENTIAL_PREVIEW
173-
"Whether to enable gRPC credentials option in OTLP gRPC Exporter" OFF)
179+
otelcpp_option_flag(
180+
OTELCPP_WITH_OTLP_GRPC_CREDENTIAL_PREVIEW
181+
"Whether to enable gRPC credentials option in OTLP gRPC Exporter" OFF)
174182

175-
otelcpp_option_flag(OTELCPP_WITH_OTLP_GRPC "Whether to include the OTLP gRPC exporter in the SDK"
176-
OFF)
183+
otelcpp_option_flag(OTELCPP_WITH_OTLP_GRPC
184+
"Whether to include the OTLP gRPC exporter in the SDK" OFF)
177185

178-
otelcpp_option_flag(OTELCPP_WITH_OTLP_HTTP "Whether to include the OTLP http exporter in the SDK"
179-
OFF)
186+
otelcpp_option_flag(OTELCPP_WITH_OTLP_HTTP
187+
"Whether to include the OTLP http exporter in the SDK" OFF)
180188

181-
otelcpp_option_flag(OTELCPP_WITH_OTLP_FILE "Whether to include the OTLP file exporter in the SDK"
182-
OFF)
189+
otelcpp_option_flag(OTELCPP_WITH_OTLP_FILE
190+
"Whether to include the OTLP file exporter in the SDK" OFF)
183191

184192
otelcpp_option_flag(
185193
OTELCPP_WITH_OTLP_HTTP_COMPRESSION
@@ -190,21 +198,24 @@ otelcpp_option_flag(
190198
OTELCPP_WITH_OTLP_UTF8_VALIDITY
191199
"Whether to enable UTF-8 validity checks for the OTLP exporter in the SDK" ON)
192200

193-
otelcpp_option_flag(OTELCPP_WITH_CURL_LOGGING "Whether to enable select CURL verbosity in OTel logs"
194-
OFF)
201+
otelcpp_option_flag(OTELCPP_WITH_CURL_LOGGING
202+
"Whether to enable select CURL verbosity in OTel logs" OFF)
195203

196-
otelcpp_option_flag(OTELCPP_WITH_ZIPKIN "Whether to include the Zipkin exporter in the SDK" OFF)
204+
otelcpp_option_flag(OTELCPP_WITH_ZIPKIN
205+
"Whether to include the Zipkin exporter in the SDK" OFF)
197206

198-
otelcpp_option_flag(OTELCPP_WITH_PROMETHEUS "Whether to include the Prometheus Client in the SDK"
199-
OFF)
207+
otelcpp_option_flag(OTELCPP_WITH_PROMETHEUS
208+
"Whether to include the Prometheus Client in the SDK" OFF)
200209

201-
otelcpp_option_flag(OTELCPP_WITH_ELASTICSEARCH
202-
"Whether to include the Elasticsearch Client in the SDK" OFF)
210+
otelcpp_option_flag(
211+
OTELCPP_WITH_ELASTICSEARCH
212+
"Whether to include the Elasticsearch Client in the SDK" OFF)
203213

204-
otelcpp_option_flag(OTELCPP_WITH_NO_GETENV "Whether the platform supports environment variables" OFF)
214+
otelcpp_option_flag(OTELCPP_WITH_NO_GETENV
215+
"Whether the platform supports environment variables" OFF)
205216

206-
# BUILD_TESTING is a standard CMake variable, so use it only as the
207-
# top-level default and do not treat it as a deprecated alias.
217+
# BUILD_TESTING is a standard CMake variable, so use it only as the top-level
218+
# default and do not treat it as a deprecated alias.
208219
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
209220
if(DEFINED BUILD_TESTING)
210221
option(OTELCPP_BUILD_TESTING "Whether to enable tests" "${BUILD_TESTING}")
@@ -215,22 +226,25 @@ else()
215226
option(OTELCPP_BUILD_TESTING "Whether to enable tests" OFF)
216227
endif()
217228

218-
otelcpp_option_flag(OTELCPP_WITH_BENCHMARK "Whether to build benchmark program" ON)
229+
otelcpp_option_flag(OTELCPP_WITH_BENCHMARK "Whether to build benchmark program"
230+
ON)
219231

220-
otelcpp_option_flag(OTELCPP_BUILD_W3CTRACECONTEXT_TEST "Whether to build w3c trace context" OFF)
232+
otelcpp_option_flag(OTELCPP_BUILD_W3CTRACECONTEXT_TEST
233+
"Whether to build w3c trace context" OFF)
221234

222-
otelcpp_option_flag(OTELCPP_MAINTAINER_MODE "Build in maintainer mode (-Wall -Werror)" OFF)
235+
otelcpp_option_flag(OTELCPP_MAINTAINER_MODE
236+
"Build in maintainer mode (-Wall -Werror)" OFF)
223237

224-
otelcpp_option_flag(OTELCPP_WITH_OPENTRACING "Whether to include the Opentracing shim" OFF)
238+
otelcpp_option_flag(OTELCPP_WITH_OPENTRACING
239+
"Whether to include the Opentracing shim" OFF)
225240

226-
otelcpp_option_flag(OTELCPP_VERSIONED_LIBS "Whether to generate the versioned shared libs"
227-
OFF)
241+
otelcpp_option_flag(OTELCPP_VERSIONED_LIBS
242+
"Whether to generate the versioned shared libs" OFF)
228243
otelcpp_option_flag(
229244
OTELCPP_BUILD_DLL
230245
"Whether to build the OpenTelemetry C++ SDK as a Windows DLL" OFF)
231246

232-
otelcpp_option_flag(OTELCPP_BUILD_PACKAGE "Whether to generate a package"
233-
OFF)
247+
otelcpp_option_flag(OTELCPP_BUILD_PACKAGE "Whether to generate a package" OFF)
234248

235249
otelcpp_option_variable(
236250
OTELCPP_EXTERNAL_COMPONENT_PATH "" STRING
@@ -241,7 +255,8 @@ if(OTELCPP_VERSIONED_LIBS AND NOT BUILD_SHARED_LIBS)
241255
endif()
242256

243257
if(WIN32)
244-
otelcpp_option_flag(OTELCPP_WITH_ETW "Whether to include the ETW Exporter in the SDK" ON)
258+
otelcpp_option_flag(OTELCPP_WITH_ETW
259+
"Whether to include the ETW Exporter in the SDK" ON)
245260
else()
246261
if(DEFINED OTELCPP_WITH_ETW OR DEFINED WITH_ETW)
247262
message(FATAL_ERROR "OTELCPP_WITH_ETW is only supported on Windows")
@@ -265,24 +280,26 @@ otelcpp_option_flag(
265280
"Whether to build http client/server examples. Requires OTELCPP_WITH_EXAMPLES and CURL"
266281
OFF)
267282

268-
otelcpp_option_flag(OTELCPP_WITH_FUNC_TESTS "Whether to build functional tests" ON)
283+
otelcpp_option_flag(OTELCPP_WITH_FUNC_TESTS "Whether to build functional tests"
284+
ON)
269285

270-
otelcpp_option_flag(OTELCPP_WITH_ASYNC_EXPORT_PREVIEW "Whether to enable async export" OFF)
286+
otelcpp_option_flag(OTELCPP_WITH_ASYNC_EXPORT_PREVIEW
287+
"Whether to enable async export" OFF)
271288

272289
# Exemplar specs status is experimental, so behind feature flag by default
273290
otelcpp_option_flag(OTELCPP_WITH_METRICS_EXEMPLAR_PREVIEW
274-
"Whether to enable exemplar within metrics" OFF)
291+
"Whether to enable exemplar within metrics" OFF)
275292

276293
# Experimental, so behind feature flag by default
277294
otelcpp_option_flag(OTELCPP_WITH_THREAD_INSTRUMENTATION_PREVIEW
278-
"Whether to enable thread instrumentation" OFF)
295+
"Whether to enable thread instrumentation" OFF)
279296

280297
otelcpp_option_flag(OTELCPP_WITH_RESOURCE_DETECTORS_PREVIEW
281-
"Whether to enable inbuilt resource detectors" OFF)
298+
"Whether to enable inbuilt resource detectors" OFF)
282299

283-
otelcpp_option_flag(OTELCPP_SKIP_DYNAMIC_LOADING_TESTS
284-
"Whether to build test libraries that are always linked as shared libs"
285-
OFF)
300+
otelcpp_option_flag(
301+
OTELCPP_SKIP_DYNAMIC_LOADING_TESTS
302+
"Whether to build test libraries that are always linked as shared libs" OFF)
286303

287304
#
288305
# Verify options dependencies
@@ -291,7 +308,9 @@ otelcpp_option_flag(OTELCPP_SKIP_DYNAMIC_LOADING_TESTS
291308
include(FetchContent)
292309

293310
if(OTELCPP_WITH_EXAMPLES_HTTP AND NOT OTELCPP_WITH_EXAMPLES)
294-
message(FATAL_ERROR "OTELCPP_WITH_EXAMPLES_HTTP=ON requires OTELCPP_WITH_EXAMPLES=ON")
311+
message(
312+
FATAL_ERROR
313+
"OTELCPP_WITH_EXAMPLES_HTTP=ON requires OTELCPP_WITH_EXAMPLES=ON")
295314
endif()
296315

297316
if(OTELCPP_WITH_GSL)
@@ -337,8 +356,8 @@ otelcpp_dependent_option(
337356
OFF)
338357

339358
#
340-
# Locally override options if OTELCPP_WITH_API_ONLY is set to prevent third party
341-
# dependencies from being imported
359+
# Locally override options if OTELCPP_WITH_API_ONLY is set to prevent third
360+
# party dependencies from being imported
342361
#
343362

344363
if(OTELCPP_WITH_API_ONLY)
@@ -566,7 +585,8 @@ message(STATUS "---------------------------------------------")
566585
message(STATUS "opentelemetry-cpp build options")
567586
message(STATUS "---------------------------------------------")
568587
message(STATUS "OTELCPP_WITH_API_ONLY: ${OTELCPP_WITH_API_ONLY}")
569-
message(STATUS "OTELCPP_WITH_NO_DEPRECATED_CODE: ${OTELCPP_WITH_NO_DEPRECATED_CODE}")
588+
message(
589+
STATUS "OTELCPP_WITH_NO_DEPRECATED_CODE: ${OTELCPP_WITH_NO_DEPRECATED_CODE}")
570590
message(STATUS "OTELCPP_WITH_ABI_VERSION_1: ${OTELCPP_WITH_ABI_VERSION_1}")
571591
message(STATUS "OTELCPP_WITH_ABI_VERSION_2: ${OTELCPP_WITH_ABI_VERSION_2}")
572592
message(STATUS "OTELCPP_VERSIONED_LIBS: ${OTELCPP_VERSIONED_LIBS}")
@@ -585,7 +605,8 @@ message(STATUS "---------------------------------------------")
585605
message(STATUS "OTELCPP_WITH_OTLP_GRPC: ${OTELCPP_WITH_OTLP_GRPC}")
586606
message(STATUS "OTELCPP_WITH_OTLP_HTTP: ${OTELCPP_WITH_OTLP_HTTP}")
587607
message(STATUS "OTELCPP_WITH_OTLP_FILE: ${OTELCPP_WITH_OTLP_FILE}")
588-
message(STATUS "OTELCPP_WITH_HTTP_CLIENT_CURL: ${OTELCPP_WITH_HTTP_CLIENT_CURL}")
608+
message(
609+
STATUS "OTELCPP_WITH_HTTP_CLIENT_CURL: ${OTELCPP_WITH_HTTP_CLIENT_CURL}")
589610
message(STATUS "OTELCPP_WITH_ZIPKIN: ${OTELCPP_WITH_ZIPKIN}")
590611
message(STATUS "OTELCPP_WITH_PROMETHEUS: ${OTELCPP_WITH_PROMETHEUS}")
591612
message(STATUS "OTELCPP_WITH_ELASTICSEARCH: ${OTELCPP_WITH_ELASTICSEARCH}")
@@ -597,19 +618,27 @@ message(STATUS "OTELCPP_WITH_CONFIGURATION: ${OTELCPP_WITH_CONFIGURATION}")
597618
message(STATUS "---------------------------------------------")
598619
message(STATUS "feature preview options")
599620
message(STATUS "---------------------------------------------")
600-
message(STATUS "OTELCPP_WITH_ASYNC_EXPORT_PREVIEW: ${OTELCPP_WITH_ASYNC_EXPORT_PREVIEW}")
621+
message(
622+
STATUS
623+
"OTELCPP_WITH_ASYNC_EXPORT_PREVIEW: ${OTELCPP_WITH_ASYNC_EXPORT_PREVIEW}")
601624
message(
602625
STATUS
603626
"OTELCPP_WITH_THREAD_INSTRUMENTATION_PREVIEW: ${OTELCPP_WITH_THREAD_INSTRUMENTATION_PREVIEW}"
604627
)
605628
message(
606-
STATUS "OTELCPP_WITH_METRICS_EXEMPLAR_PREVIEW: ${OTELCPP_WITH_METRICS_EXEMPLAR_PREVIEW}")
629+
STATUS
630+
"OTELCPP_WITH_METRICS_EXEMPLAR_PREVIEW: ${OTELCPP_WITH_METRICS_EXEMPLAR_PREVIEW}"
631+
)
607632
message(
608-
STATUS "OTELCPP_WITH_OTLP_GRPC_SSL_MTLS_PREVIEW: ${OTELCPP_WITH_OTLP_GRPC_SSL_MTLS_PREVIEW}")
633+
STATUS
634+
"OTELCPP_WITH_OTLP_GRPC_SSL_MTLS_PREVIEW: ${OTELCPP_WITH_OTLP_GRPC_SSL_MTLS_PREVIEW}"
635+
)
609636
message(
610637
STATUS
611-
"OTELCPP_WITH_OTLP_GRPC_CREDENTIAL_PREVIEW: ${OTELCPP_WITH_OTLP_GRPC_CREDENTIAL_PREVIEW}")
612-
message(STATUS "OTELCPP_WITH_OTLP_RETRY_PREVIEW: ${OTELCPP_WITH_OTLP_RETRY_PREVIEW}")
638+
"OTELCPP_WITH_OTLP_GRPC_CREDENTIAL_PREVIEW: ${OTELCPP_WITH_OTLP_GRPC_CREDENTIAL_PREVIEW}"
639+
)
640+
message(
641+
STATUS "OTELCPP_WITH_OTLP_RETRY_PREVIEW: ${OTELCPP_WITH_OTLP_RETRY_PREVIEW}")
613642
message(
614643
STATUS
615644
"OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW: ${OTELCPP_WITH_METRICS_BOUND_INSTRUMENTS_PREVIEW}"
@@ -619,15 +648,19 @@ message(STATUS "third-party options")
619648
message(STATUS "---------------------------------------------")
620649
message(STATUS "WITH_NLOHMANN_JSON: ${USE_NLOHMANN_JSON}")
621650
message(STATUS "OTELCPP_WITH_CURL_LOGGING: ${OTELCPP_WITH_CURL_LOGGING}")
622-
message(STATUS "OTELCPP_WITH_OTLP_HTTP_COMPRESSION: ${OTELCPP_WITH_OTLP_HTTP_COMPRESSION}")
651+
message(
652+
STATUS
653+
"OTELCPP_WITH_OTLP_HTTP_COMPRESSION: ${OTELCPP_WITH_OTLP_HTTP_COMPRESSION}")
623654
message(STATUS "---------------------------------------------")
624655
message(STATUS "examples and test options")
625656
message(STATUS "---------------------------------------------")
626657
message(STATUS "OTELCPP_WITH_BENCHMARK: ${OTELCPP_WITH_BENCHMARK}")
627658
message(STATUS "OTELCPP_WITH_EXAMPLES: ${OTELCPP_WITH_EXAMPLES}")
628659
message(STATUS "OTELCPP_WITH_EXAMPLES_HTTP: ${OTELCPP_WITH_EXAMPLES_HTTP}")
629660
message(STATUS "OTELCPP_WITH_FUNC_TESTS: ${OTELCPP_WITH_FUNC_TESTS}")
630-
message(STATUS "OTELCPP_BUILD_W3CTRACECONTEXT_TEST: ${OTELCPP_BUILD_W3CTRACECONTEXT_TEST}")
661+
message(
662+
STATUS
663+
"OTELCPP_BUILD_W3CTRACECONTEXT_TEST: ${OTELCPP_BUILD_W3CTRACECONTEXT_TEST}")
631664
message(STATUS "OTELCPP_BUILD_TESTING: ${OTELCPP_BUILD_TESTING}")
632665
message(STATUS "---------------------------------------------")
633666
message(STATUS "versions")

examples/common/foo_library/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
add_library(common_foo_library foo_library.h foo_library.cc)
55

6-
if(DEFINED OTELCPP_BUILD_DLL)
6+
if(OTELCPP_BUILD_DLL)
77
target_compile_definitions(common_foo_library
88
PRIVATE OPENTELEMETRY_BUILD_IMPORT_DLL)
99
endif()

examples/common/logs_foo_library/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
add_library(common_logs_foo_library foo_library.h foo_library.cc)
55

6-
if(DEFINED OTELCPP_BUILD_DLL)
6+
if(OTELCPP_BUILD_DLL)
77
target_compile_definitions(common_logs_foo_library
88
PRIVATE OPENTELEMETRY_BUILD_IMPORT_DLL)
99
endif()

examples/common/metrics_foo_library/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
add_library(common_metrics_foo_library foo_library.h foo_library.cc)
55

6-
if(DEFINED OTELCPP_BUILD_DLL)
6+
if(OTELCPP_BUILD_DLL)
77
target_compile_definitions(common_metrics_foo_library
88
PRIVATE OPENTELEMETRY_BUILD_IMPORT_DLL)
99
endif()

examples/configuration/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if(OTELCPP_WITH_PROMETHEUS)
6161
PRIVATE opentelemetry-cpp::prometheus_exporter_builder)
6262
endif()
6363

64-
if(DEFINED OTELCPP_BUILD_DLL)
64+
if(OTELCPP_BUILD_DLL)
6565
target_compile_definitions(example_yaml
6666
PRIVATE OPENTELEMETRY_BUILD_IMPORT_DLL)
6767
target_link_libraries(example_yaml

examples/environment_carrier/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
if(NOT WIN32)
55
add_executable(example_environment_carrier main.cc)
66

7-
if(DEFINED OTELCPP_BUILD_DLL)
7+
if(OTELCPP_BUILD_DLL)
88
target_compile_definitions(example_environment_carrier
99
PRIVATE OPENTELEMETRY_BUILD_IMPORT_DLL)
1010
target_link_libraries(example_environment_carrier

examples/logs_simple/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
add_executable(example_logs_simple main.cc)
55
target_link_libraries(example_logs_simple PRIVATE common_logs_foo_library)
66

7-
if(DEFINED OTELCPP_BUILD_DLL)
7+
if(OTELCPP_BUILD_DLL)
88
target_compile_definitions(example_logs_simple
99
PRIVATE OPENTELEMETRY_BUILD_IMPORT_DLL)
1010
target_link_libraries(example_logs_simple

examples/metrics_simple/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ add_executable(metrics_ostream_example metrics_ostream.cc)
66
target_link_libraries(metrics_ostream_example
77
PRIVATE common_metrics_foo_library)
88

9-
if(DEFINED OTELCPP_BUILD_DLL)
9+
if(OTELCPP_BUILD_DLL)
1010
target_compile_definitions(metrics_ostream_example
1111
PRIVATE OPENTELEMETRY_BUILD_IMPORT_DLL)
1212
target_link_libraries(metrics_ostream_example

0 commit comments

Comments
 (0)