From d3a1ecbd1d735dbb37ab32afed472cda2f7724bc Mon Sep 17 00:00:00 2001
From: Manuel Grizonnet <manuel.grizonnet@orfeo-toolbox.org>
Date: Thu, 19 Mar 2015 12:39:11 +0100
Subject: [PATCH] ENH: improve support with cmake 3.1

---
 CMakeLists.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a96b8c63f8..f610fab915 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,7 @@ endif()
 
 foreach(p
     CMP0025 # CMake 3.0
-    CMP0042 # CMake 3.0
+    CMP0042 # CMake 3.0 
     )
   if(POLICY ${p})
     cmake_policy(SET ${p} NEW)
@@ -18,6 +18,12 @@ if(POLICY CMP0046)
   cmake_policy(SET CMP0046 OLD)
 endif()
 
+# TODO Check if OTB cmake is compatible with CMP0054 NEW policy
+# CMP0054 : New policy introduce in CMake 3.1, keep old behaviour for now
+if(POLICY CMP0054)
+  cmake_policy(SET CMP0054 OLD)
+endif()
+
 project(OTB)
 
 include(CMakeDependentOption)
-- 
GitLab