From 9577253f0c2a2622ae202c9a21e42ee5fedfdd38 Mon Sep 17 00:00:00 2001 From: tzik Date: Wed, 15 Dec 2021 15:54:11 +0900 Subject: [PATCH] Add policy_max to minimum required cmake version Specify the policy max value on the cmake_minimum_required, that allows CMake to use newer CMake policy up to CMake 3.16. --- CMakeLists.txt | 2 +- apps/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 29a8bd3..9ff1766 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # Many projects still are stuck using CMake 2.8 is several places so it's good to provide backward support too. This is # specially true in old embedded systems (OpenWRT and friends) where CMake isn't necessarily upgraded. -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 2.8...3.16) if(POLICY CMP0048) cmake_policy(SET CMP0048 NEW) diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index f7c9dec..bd7aa25 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 2.8) # see ../CMakeLists.txt for why 2.8 +cmake_minimum_required(VERSION 2.8...3.16) # see ../CMakeLists.txt for why 2.8 if(POLICY CMP0075) cmake_policy(SET CMP0075 NEW)