Skip to content

Commit

Permalink
Set CMake3.30 policies (#2492)
Browse files Browse the repository at this point in the history
Prevent cmake warnings.
  • Loading branch information
dweindl authored Sep 24, 2024
1 parent bea2dfe commit 844981a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
13 changes: 3 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

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.15)
cmake_policy(VERSION 3.15...3.27)
cmake_policy(VERSION 3.15...3.30)

# cmake >=3.27
if(POLICY CMP0144)
Expand Down

0 comments on commit 844981a

Please sign in to comment.