Commit 8bbee8f3 by Michael Haggerty

Fix compilation for CMake versions 3.0.x where x >= 1

Apparently policy CMP0015 was added in CMake 3.1. With CMake 3.0.2,
the build was failing with

    CMake Error at CMakeLists.txt:18 (CMAKE_POLICY):
      Policy "CMP0051" is not known to this version of CMake.

This patch makes it work.
parent 8ac8c78c
......@@ -14,7 +14,7 @@
PROJECT(libgit2 C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
CMAKE_POLICY(SET CMP0015 NEW)
IF (CMAKE_VERSION VERSION_GREATER 3.0)
IF (NOT CMAKE_VERSION VERSION_LESS 3.1)
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