11# Copyright The OpenTelemetry Authors
22# SPDX-License-Identifier: Apache-2.0
33
4- cmake_minimum_required (VERSION 3.10)
5-
6- # See https://cmake.org/cmake/help/latest/policy/CMP0074.html required by
7- # certain version of zlib which CURL depends on.
8- if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12" )
9- cmake_policy (SET CMP0074 NEW)
10- endif ()
11-
12- # Allow to use normal variable for option()
13- if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13" )
14- cmake_policy (SET CMP0077 NEW)
15- endif ()
16-
17- # Prefer CMAKE_MSVC_RUNTIME_LIBRARY if possible
18- if (POLICY CMP0091)
19- cmake_policy (SET CMP0091 NEW)
20- endif ()
4+ cmake_minimum_required (VERSION 3.16)
215
226if (POLICY CMP0092)
237 # https://cmake.org/cmake/help/latest/policy/CMP0092.html#policy:CMP0092 Make
@@ -166,8 +150,6 @@ else()
166150 endif ()
167151endif ()
168152
169- message (STATUS "OPENTELEMETRY_ABI_VERSION_NO=${OPENTELEMETRY_ABI_VERSION_NO} " )
170-
171153if (OPENTELEMETRY_CPP_HEADER_VERSION_H MATCHES
172154 "OPENTELEMETRY_VERSION[ \t\r\n ]+\" ?([^\" ]+)\" ?" )
173155 set (OPENTELEMETRY_VERSION ${CMAKE_MATCH_1} )
@@ -178,8 +160,6 @@ else()
178160 )
179161endif ()
180162
181- message (STATUS "OPENTELEMETRY_VERSION=${OPENTELEMETRY_VERSION} " )
182-
183163option (WITH_NO_DEPRECATED_CODE "Do not include deprecated code" OFF )
184164
185165set (WITH_STL
@@ -399,7 +379,7 @@ if(WITH_PROMETHEUS)
399379 string (REGEX REPLACE "^v" "" prometheus-cpp_VERSION
400380 "${prometheus-cpp_VERSION}" )
401381 endif ()
402-
382+ set (prometheus-cpp_FOUND TRUE )
403383 message (
404384 STATUS
405385 "Using local prometheus-cpp from submodule. Version = ${prometheus-cpp_VERSION}"
@@ -421,8 +401,6 @@ if(WITH_OTLP_GRPC
421401 OR WITH_OTLP_FILE)
422402
423403 find_package (Protobuf)
424- # Protobuf 3.22 or upper require abseil-cpp, we can find it in
425- # opentelemetry-cpp-config.cmake
426404
427405 if (WITH_OTLP_GRPC)
428406 find_package (gRPC CONFIG)
@@ -671,8 +649,6 @@ if(BUILD_TESTING)
671649 if (GTEST_INCLUDE_DIRS)
672650 include_directories (SYSTEM ${GTEST_INCLUDE_DIRS} )
673651 endif ()
674- message (STATUS "GTEST_INCLUDE_DIRS = ${GTEST_INCLUDE_DIRS} " )
675- message (STATUS "GTEST_BOTH_LIBRARIES = ${GTEST_BOTH_LIBRARIES} " )
676652
677653 # Try to find gmock
678654 if (NOT GMOCK_LIB AND TARGET GTest::gmock)
@@ -800,7 +776,7 @@ if(gRPC_FOUND)
800776 message (STATUS "gRPC: ${gRPC_VERSION} " )
801777endif ()
802778if (CURL_FOUND)
803- message (STATUS "CURL: ${CURL_VERSION } " )
779+ message (STATUS "CURL: ${CURL_VERSION_STRING } " )
804780endif ()
805781if (ZLIB_FOUND)
806782 message (STATUS "ZLIB: ${ZLIB_VERSION} " )
0 commit comments