]> Creatis software - creaEnvironment.git/commitdiff
Avoid Warnings CREATOOLS.2-0-3
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 4 Mar 2010 11:38:22 +0000 (11:38 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 4 Mar 2010 11:38:22 +0000 (11:38 +0000)
CMakeLists.txt

index 74a9fbe06d7bd7bf4aa08141a97794e257df1037..c521b100549ebf8210587d047b7dd34ea26a305c 100644 (file)
@@ -1,5 +1,14 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
+#MARK_AS_ADVANCED( FORCE CMAKE_BACKWARDS_COMPATIBILITY )
+
+# for CMake 2.6 corrected behaviour (see "cmake --help-policy CMP0003")
+IF(COMMAND cmake_policy AND ${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
+  CMAKE_POLICY(SET CMP0003 NEW)
+  CMAKE_POLICY(SET CMP0005 NEW)  
+  CMAKE_POLICY(SET CMP0011 NEW)
+ENDIF(COMMAND cmake_policy AND ${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
+
 PROJECT(creaEnvironment)
 
 SET(PROJECT_MAJOR_VERSION 1)