From 572d8d0076ac71eacd7a29be18d749a721d96a8b Mon Sep 17 00:00:00 2001 From: Christian Kern Date: Fri, 27 Mar 2015 10:18:24 +0100 Subject: [PATCH] If the policy is not known, CMake throws an error. Fix. --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 380e1ad..eb48dd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,8 +45,13 @@ set (EMBB_BASE_VERSION_PATCH 3) # See http://www.cmake.org/cmake/help/v3.1/policy/CMP0053.html # # Set those policies to be treated the legacy (CMake < 3.1) way. -cmake_policy(SET CMP0054 OLD) -cmake_policy(SET CMP0053 OLD) +if(POLICY CMP0054) + cmake_policy(SET CMP0054 OLD) +endif(POLICY CMP0054) + +if(POLICY CMP0053) + cmake_policy(SET CMP0053 OLD) +endif(POLICY CMP0053) if(NOT CMAKE_BUILD_TYPE) -- libgit2 0.26.0