mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 09:50:04 +08:00
43401f5835
* [opentelemetry-cpp] unvendor absl polyfills By default opentelemetry vendors-in a copy of some Abseil polyfills (e.g. `absl::variant`). That makes it hard (I would claim nearly impossible) to use both the abseil and the opentelemetry-cpp ports at the same time, as both define `absl::variant` in some of their headers. It seems better to always use the `-DHAVE_ABSEIL=ON` CMake option and depend on the abseil port. Outside vcpkg it may be useful to use such vendored-in copies of the code, as that "simplifies" dependency management. In the context of vcpkg that is just wasteful. Simplified how to support `abseil[cxx17]` by removing some code in opentelemetry that forcibly downgraded the compiler to use C++11. Add a missing dependency for gRPC generated code. This code indirectly depends on Abseil too. * Opentelemetry is missing a find_dependency() when -DHAVE_ABSEIL=ON
27 lines
844 B
Diff
27 lines
844 B
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index f4fa064..a868106 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -126,21 +126,6 @@ endif()
|
|
option(OPENTELEMETRY_INSTALL "Whether to install opentelemetry targets"
|
|
${OPENTELEMETRY_INSTALL_default})
|
|
|
|
-if(NOT DEFINED CMAKE_CXX_STANDARD)
|
|
- if(WITH_STL)
|
|
- # Require at least C++17. C++20 is needed to avoid gsl::span
|
|
- if(CMAKE_VERSION VERSION_GREATER 3.11.999)
|
|
- # Ask for 20, may get anything below
|
|
- set(CMAKE_CXX_STANDARD 20)
|
|
- else()
|
|
- # Ask for 17, may get anything below
|
|
- set(CMAKE_CXX_STANDARD 17)
|
|
- endif()
|
|
- else()
|
|
- set(CMAKE_CXX_STANDARD 11)
|
|
- endif()
|
|
-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
|