11# Copyright The OpenTelemetry Authors
22# SPDX-License-Identifier: Apache-2.0
33
4- cmake_minimum_required (VERSION 3.14)
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
248 # sure the /W3 is not removed from CMAKE_CXX_FLAGS since CMake 3.15
259 cmake_policy (SET CMP0092 OLD)
2610endif ()
2711
28- # MSVC RTTI flag /GR should not be not added to CMAKE_CXX_FLAGS by default. @see
12+ # MSVC RTTI flag /GR should not be added to CMAKE_CXX_FLAGS by default. @see
2913# https://cmake.org/cmake/help/latest/policy/CMP0117.html
3014if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.20.0" )
3115 cmake_policy (SET CMP0117 NEW)
@@ -36,11 +20,6 @@ project(opentelemetry-cpp)
3620# Mark variables as used so cmake doesn't complain about them
3721mark_as_advanced (CMAKE_TOOLCHAIN_FILE)
3822
39- # Don't use customized cmake modules if vcpkg is used to resolve dependence.
40- if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)
41- list (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR} /cmake/modules/" )
42- endif ()
43-
4423# Set the third-party release git tags.
4524if (EXISTS "${opentelemetry-cpp_SOURCE_DIR}/third_party_release" )
4625 file (STRINGS "${opentelemetry-cpp_SOURCE_DIR}/third_party_release"
0 commit comments