From 076effa650d4cc2130c1b4ff9ed261188ae57aeb Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Tue, 11 May 2021 13:31:03 -0700 Subject: [PATCH 1/3] Add curl via vcpkg to WIndows builds --- tools/setup-buildtools.cmd | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/setup-buildtools.cmd b/tools/setup-buildtools.cmd index 2c0912ca2e..39270b9c7c 100644 --- a/tools/setup-buildtools.cmd +++ b/tools/setup-buildtools.cmd @@ -54,5 +54,6 @@ vcpkg install abseil:x64-windows vcpkg install protobuf:x64-windows vcpkg install gRPC:x64-windows vcpkg install prometheus-cpp:x64-windows +vcpkg install curl:x64-windows popd exit /b 0 From 6aeb311043fe56b29f4828ae3e60e154e2eb1c7d Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Tue, 15 Jun 2021 11:51:03 -0700 Subject: [PATCH 2/3] Update CMakeLists.txt CMake v3.12 introduced C++20 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f8c67ef9a..ec231a2edb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,7 +107,7 @@ if(WITH_STL) add_definitions(-DHAVE_CPP_STDLIB) add_definitions(-DHAVE_GSL) # Require at least C++17. C++20 is needed to avoid gsl::span - if(CMAKE_VERSION VERSION_GREATER 3.18.0) + if(CMAKE_VERSION VERSION_GREATER 3.11.999) # Ask for 20, may get anything below set(CMAKE_CXX_STANDARD 20) else() From ed14e2af687063894242a02c700f34c575712321 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Tue, 15 Jun 2021 12:08:49 -0700 Subject: [PATCH 3/3] Fix gcc-9 c++20 compilation issues --- api/include/opentelemetry/std/variant.h | 1 + api/test/nostd/string_view_test.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/include/opentelemetry/std/variant.h b/api/include/opentelemetry/std/variant.h index 00cd99cc57..cb696ab397 100644 --- a/api/include/opentelemetry/std/variant.h +++ b/api/include/opentelemetry/std/variant.h @@ -140,6 +140,7 @@ constexpr auto visit(_Callable &&_Obj, _Variants &&... _Args) }; #else +using std::bad_variant_access; template constexpr std::variant_alternative_t> &get(std::variant &v) diff --git a/api/test/nostd/string_view_test.cc b/api/test/nostd/string_view_test.cc index d5c7fe4fdd..fc580debc1 100644 --- a/api/test/nostd/string_view_test.cc +++ b/api/test/nostd/string_view_test.cc @@ -4,7 +4,7 @@ #include "opentelemetry/nostd/string_view.h" #include - +#include #include using opentelemetry::nostd::string_view;