From: jean-pierre roux Date: Thu, 4 Mar 2010 11:38:22 +0000 (+0000) Subject: Avoid Warnings X-Git-Tag: CREATOOLS.2-0-3 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=697d4829578ccfc63857d8710652bf0b8a60b278;p=creaEnvironment.git Avoid Warnings --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 74a9fbe..c521b10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)