From 7460364221e7f241b3ccf282b6c45d161f0ad996 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Thu, 10 Oct 2024 20:54:38 +0200 Subject: [PATCH] CMake: Set policies for CMake 3.31 ... and remove some unnecessary stuff. --- CMakeLists.txt | 2 +- src/CMakeLists.template.cmake | 2 +- swig/CMakeLists_model.cmake | 13 ------------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f096692610..2550a0a05e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.22) # When updating the policy version, please also update it in # src/CMakeLists.template.cmake -cmake_policy(VERSION 3.22...3.30) +cmake_policy(VERSION 3.22...3.31) project(amici) diff --git a/src/CMakeLists.template.cmake b/src/CMakeLists.template.cmake index 4ead82b79d..78377d753e 100644 --- a/src/CMakeLists.template.cmake +++ b/src/CMakeLists.template.cmake @@ -1,6 +1,6 @@ # Build AMICI model cmake_minimum_required(VERSION 3.22) -cmake_policy(VERSION 3.22...3.30) +cmake_policy(VERSION 3.22...3.31) project(TPL_MODELNAME) diff --git a/swig/CMakeLists_model.cmake b/swig/CMakeLists_model.cmake index 523571c52e..314996c479 100644 --- a/swig/CMakeLists_model.cmake +++ b/swig/CMakeLists_model.cmake @@ -1,16 +1,3 @@ -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) - - if(DEFINED ENV{SWIG}) set(SWIG_EXECUTABLE $ENV{SWIG}) endif()