From fc8f854d47deea8ccb884898f7a42051caaefe42 Mon Sep 17 00:00:00 2001 From: Tom Tan Date: Thu, 9 Sep 2021 15:07:02 -0700 Subject: [PATCH] Enable CMake to search the new package variable _ROOT (#975) * Enable CMake to search the new package variable _ROOT * CMake format --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16899ad521..ccc132a344 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,12 @@ cmake_minimum_required(VERSION 3.1) # versions of gtest cmake_policy(SET CMP0057 NEW) +# See https://cmake.org/cmake/help/v3.12/policy/CMP0074.html required by certain +# version of zlib which is dependeded by cURL. +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12") + cmake_policy(SET CMP0074 NEW) +endif() + project(opentelemetry-cpp) # Mark variables as used so cmake doesn't complain about them