From: Jean-Christophe Fillion-Robin Date: Thu, 6 Dec 2018 06:31:55 +0000 (-0500) Subject: cmake: Set CMP0074 to NEW X-Git-Tag: v3.4.0~106^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71a16e18591cb570515687c42eb4e3c77605e014;p=thirdparty%2Flibarchive.git cmake: Set CMP0074 to NEW This is to address the following configuration warning reported when configuring LibArchive passing ZLIB_ROOT option: CMake Warning (dev) at CMakeLists.txt:393 (FIND_PACKAGE): Policy CMP0074 is not set: find_package uses _ROOT variables. Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy command to set the policy and suppress this warning. CMake variable ZLIB_ROOT is set to: /path/to/zlib-install For compatibility, CMake is ignoring the variable. This warning is for project developers. Use -Wno-dev to suppress it. Co-authored-by: Matt McCormick --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 81aa1aebe..9faad848c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,8 @@ # CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) +if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) #3.12.0 `find_package()`` uses ``_ROOT`` variables. +endif() # PROJECT(libarchive C) #