From c19194fed5fa40263efa9b0548a0c641557f0513 Mon Sep 17 00:00:00 2001 From: Anthony Thibault Date: Mon, 15 Oct 2018 16:12:28 -0700 Subject: [PATCH 1/2] Squelch cmake warning CMP0074 without requiring an update to cmake 3.12. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a887a35fcc..c6cbd01219 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,11 @@ else() cmake_minimum_required(VERSION 3.2) endif() +if (${CMAKE_MAJOR_VERSION} GREATER 2 AND ${CMAKE_MINOR_VERSION} GREATER 11) + # squelch the Policy CMP0074 warning without requiring an update to cmake 3.12. + cmake_policy(SET CMP0074 NEW) +endif() + project(hifi) include("cmake/init.cmake") From 2bc99d389415be89a5a18b0a81697ef26fbc39b0 Mon Sep 17 00:00:00 2001 From: Anthony Thibault Date: Fri, 19 Oct 2018 15:17:29 -0700 Subject: [PATCH 2/2] CMP0074 Warning: Proper check for cmake versions 4.x and higher --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c6cbd01219..d52a557cb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,8 @@ else() cmake_minimum_required(VERSION 3.2) endif() -if (${CMAKE_MAJOR_VERSION} GREATER 2 AND ${CMAKE_MINOR_VERSION} GREATER 11) - # squelch the Policy CMP0074 warning without requiring an update to cmake 3.12. +# squelch the Policy CMP0074 warning without requiring an update to cmake 3.12. +if ((${CMAKE_MAJOR_VERSION} EQUAL 3 AND ${CMAKE_MINOR_VERSION} GREATER 11) OR ${CMAKE_MAJOR_VERSION} GREATER 3) cmake_policy(SET CMP0074 NEW) endif()