From 54deaf7765fe8430143384a2e1bb80c3d0199d03 Mon Sep 17 00:00:00 2001 From: guigues Date: Fri, 21 Nov 2008 12:49:55 +0000 Subject: [PATCH] CMake 2.6 compat --- CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bce73aa..615047e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,15 @@ +# +# Test CMake version +# +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) +ENDIF(COMMAND cmake_policy AND ${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4) + PROJECT(creaMaracasVisu) SET(PROJECT_MAJOR_VERSION 1) @@ -32,4 +44,4 @@ MARK_AS_ADVANCED( #SUBDIRS(appli) #SUBDIRS(lib) SUBDIRS(lib) -SUBDIRS(bbtk) \ No newline at end of file +SUBDIRS(bbtk) -- 2.47.1