Skip to content

Commit

Permalink
CMake: Set policies for CMake 3.31 (#2539)
Browse files Browse the repository at this point in the history
... and remove some unnecessary stuff.
  • Loading branch information
dweindl authored Oct 11, 2024
1 parent f5533ba commit ca01930
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.template.cmake
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
13 changes: 0 additions & 13 deletions swig/CMakeLists_model.cmake
Original file line number Diff line number Diff line change
@@ -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()
Expand Down

0 comments on commit ca01930

Please sign in to comment.