From 844981a041479ba38813e9614c610c505066401a Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 24 Sep 2024 11:05:54 +0200 Subject: [PATCH] Set CMake3.30 policies (#2492) Prevent cmake warnings. --- CMakeLists.txt | 13 +++---------- src/CMakeLists.template.cmake | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2dc0ada467..bb9491b58d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,16 +2,9 @@ # Build AMICI library # cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) -# cmake >= 3.30 -if(POLICY CMP0167) - cmake_policy(SET CMP0167 NEW) -endif(POLICY CMP0167) +# When updating the policy version, please also update it in +# src/CMakeLists.template.cmake +cmake_policy(VERSION 3.15...3.30) project(amici) diff --git a/src/CMakeLists.template.cmake b/src/CMakeLists.template.cmake index dbad3e146c..acffe7e247 100644 --- a/src/CMakeLists.template.cmake +++ b/src/CMakeLists.template.cmake @@ -1,6 +1,6 @@ # Build AMICI model cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) +cmake_policy(VERSION 3.15...3.30) # cmake >=3.27 if(POLICY CMP0144)