Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment thread
owent marked this conversation as resolved.
Outdated

if(CMAKE_MINOR_VERSION VERSION_GREATER "3.18")
# Ask for 20, may get anything below
set(CMAKE_CXX_STANDARD 20)
Expand Down Expand Up @@ -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 AND NOT PROTOBUF_FOUND) OR (NOT gRPC_FOUND))
if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE))
install_windows_deps()
endif()
Expand All @@ -142,7 +140,7 @@ if(WITH_OTLP)
include(${CMAKE_TOOLCHAIN_FILE})
endif()

if(NOT protobuf_FOUND)
if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)
find_package(Protobuf REQUIRED)
endif()
if(NOT gRPC_FOUND)
Expand All @@ -157,7 +155,9 @@ if(WITH_OTLP)
endif()
endif()
# Latest Protobuf uses mixed case instead of uppercase
set(PROTOBUF_PROTOC_EXECUTABLE ${Protobuf_PROTOC_EXECUTABLE})
if(Protobuf_PROTOC_EXECUTABLE)
set(PROTOBUF_PROTOC_EXECUTABLE ${Protobuf_PROTOC_EXECUTABLE})
endif()
endif()
message("PROTOBUF_PROTOC_EXECUTABLE=${PROTOBUF_PROTOC_EXECUTABLE}")

Expand Down
2 changes: 2 additions & 0 deletions api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()