Commit 94aa36ef by Edward Thomson

cmake: test for CMP0051 instead of version check

We can use policy checks to see if a policy exists in cmake, like
CMP0051, instead of relying on the version.
parent 8abd514c
......@@ -14,7 +14,7 @@
PROJECT(libgit2 C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
CMAKE_POLICY(SET CMP0015 NEW)
IF (NOT CMAKE_VERSION VERSION_LESS 3.1)
IF (POLICY CMP0051)
CMAKE_POLICY(SET CMP0051 NEW)
ENDIF()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment