Skip to content

Commit

Permalink
[BUILD] require cmake 3.18, make policy conditional (#1303)
Browse files Browse the repository at this point in the history
According to
https://cmake.org/cmake/help/v3.0/manual/cmake-policies.7.html, just
setting policy shouldn't require changing minimum required CMake version
(moreover, setting minimum cmake version by default sets all new
policies to True)
cc @malfet
  • Loading branch information
ngimel committed Mar 8, 2023
1 parent 78b311f commit 9e6346e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.20)
cmake_minimum_required(VERSION 3.18)

if(POLICY CMP0116)
# Introduced in cmake 3.20
# https://cmake.org/cmake/help/latest/policy/CMP0116.html
cmake_policy(SET CMP0116 OLD)
cmake_policy(SET CMP0116 OLD)
endif()

include(ExternalProject)

Expand Down

0 comments on commit 9e6346e

Please sign in to comment.