From c0e2def7d81a43d6b3367999f60070d05d86ebef Mon Sep 17 00:00:00 2001 From: owent Date: Tue, 11 May 2021 20:53:12 +0800 Subject: [PATCH] Fix issues #740 and #741 Signed-off-by: owent --- CMakeLists.txt | 6 ++---- api/CMakeLists.txt | 2 ++ tools/vcpkg | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c414bcbd4..53df8ed692 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,8 +49,6 @@ endif() if(WITH_STL) # Require at least C++17. C++20 is needed to avoid gsl::span - add_definitions(-DHAVE_CPP_STDLIB -DHAVE_GSL) - if(CMAKE_MINOR_VERSION VERSION_GREATER "3.18") # Ask for 20, may get anything below set(CMAKE_CXX_STANDARD 20) @@ -130,7 +128,7 @@ if(WITH_OTLP) set(protobuf_MODULE_COMPATIBLE ON) find_package(Protobuf) find_package(gRPC) - if((NOT protobuf_FOUND) OR (NOT gRPC_FOUND)) + if((NOT Protobuf_FOUND) OR (NOT gRPC_FOUND)) if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) install_windows_deps() endif() @@ -142,7 +140,7 @@ if(WITH_OTLP) include(${CMAKE_TOOLCHAIN_FILE}) endif() - if(NOT protobuf_FOUND) + if(NOT Protobuf_FOUND) find_package(Protobuf REQUIRED) endif() if(NOT gRPC_FOUND) diff --git a/api/CMakeLists.txt b/api/CMakeLists.txt index d9822530a2..1f1138cd1e 100644 --- a/api/CMakeLists.txt +++ b/api/CMakeLists.txt @@ -25,6 +25,8 @@ endif() if(WITH_STL) message("Building with standard library types...") + target_compile_definitions(opentelemetry_api INTERFACE HAVE_CPP_STDLIB + HAVE_GSL) else() message("Building with nostd types...") endif() diff --git a/tools/vcpkg b/tools/vcpkg index e9f8cc67a5..fddf974110 160000 --- a/tools/vcpkg +++ b/tools/vcpkg @@ -1 +1 @@ -Subproject commit e9f8cc67a5e5541973e53ac03f88adb45cc1b21b +Subproject commit fddf97411017bfcd7dd988d754b25efc3d6a1c3e