From 58facf73fed2c1e71c4a1f10f2efad1b9bde8e21 Mon Sep 17 00:00:00 2001 From: Tom Tan Date: Thu, 9 Sep 2021 11:57:29 -0700 Subject: [PATCH 1/2] Enable CMake to search the new package variable _ROOT --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16899ad521..9efe53a12a 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 From bf47d22c8e7f89069feb672d747871b664be0a5f Mon Sep 17 00:00:00 2001 From: Tom Tan Date: Thu, 9 Sep 2021 13:11:52 -0700 Subject: [PATCH 2/2] CMake format --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9efe53a12a..ccc132a344 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ 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) + cmake_policy(SET CMP0074 NEW) endif() project(opentelemetry-cpp)