From c0c75cf957d5e7aef30c9c59c27a6ccc760d60c5 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 20 Feb 2008 21:38:34 +0000 Subject: -give a useful error message if somebody is using an old cmake cvs, which doesn't have set_property() yet Alex svn path=/trunk/KDE/kdelibs/; revision=777542 --- modules/FindKDE4Internal.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index dcde0cf0..fb1b3f1d 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -655,11 +655,15 @@ if(WIN32) endif(WIN32) -# CMake 2.6 gives errors if there are multiple targets with the same name -# we use this for the target "buildtests", which is created for the unit tests -# and which depends on the tests, so building "buildtests" builds all the tests -# enabling this property disables this check in CMake if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) + if(NOT COMMAND SET_PROPERTY) + message(FATAL_ERROR "You are using an old version of CMake from cvs, please update to CMake >= 2.6.0 or cvs at least from Feb 20th, 2008") + endif(NOT COMMAND SET_PROPERTY) + + # CMake 2.6 gives errors if there are multiple targets with the same name + # we use this for the target "buildtests", which is created for the unit tests + # and which depends on the tests, so building "buildtests" builds all the tests + # enabling this property disables this check in CMake set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1) endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) -- cgit v1.2.1