Skip to content

Commit

Permalink
Partial revert of:
Browse files Browse the repository at this point in the history
commit 74ec691
Author: WenTao Ou <[email protected]>
Date:   Thu Apr 7 14:06:59 2022 +0800

    Move public definitions into `opentelemetry_api`. (open-telemetry#1314)

    Signed-off-by: owent <[email protected]>

When using WITH_STL in cmake,
HAVE_CPP_STDLIB must be defined for unit tests.
  • Loading branch information
marcalff committed Sep 7, 2022
1 parent 6a8f2ff commit c81cc34
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ endif()

if(WITH_STL)
# These definitions are needed for test projects that do not link against
# opentelemetry-api library directly. We ensure that variant implementation
# (absl::variant or std::variant) in variant unit test code is consistent with
# the global project build definitions. Optimize for speed to reduce the hops
# opentelemetry-api library directly. We ensure that STL implementation
# (nostd:: or std::) in unit test code is consistent with
# the global project build definitions.
add_definitions(-DHAVE_CPP_STDLIB)

# Optimize for speed to reduce the hops
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
if(CMAKE_BUILD_TYPE MATCHES Debug)
# Turn off optimizations for DEBUG
Expand Down

0 comments on commit c81cc34

Please sign in to comment.