diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2017-10-14 08:36:54 +0200 |
---|---|---|
committer | Michael Haggerty <mhagger@alum.mit.edu> | 2017-10-14 08:36:54 +0200 |
commit | 8bbee8f397de3bc15dc1ee8f50f09136db707a7c (patch) | |
tree | 08e6f7bb5f296c8223d88e7b1539607cc42a054a /CMakeLists.txt | |
parent | 8ac8c78c35905f7f9cc37f240c3d633a7cc5a5e3 (diff) | |
download | libgit2-8bbee8f397de3bc15dc1ee8f50f09136db707a7c.tar.gz |
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b988f6110..cd761cf29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() |