From 493aa49d3e73cf0a191f5e13afd822dfbfe8fd79 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 20 Feb 2008 00:00:32 +0000 Subject: cmake 2.6 is stricter, it checks whether there are targets with multiple names. This breaks buildtests target, since this is created multiple times. Disable the check in cmake so it works again. Alex svn path=/trunk/KDE/kdelibs/; revision=777214 --- modules/FindKDE4Internal.cmake | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 246d1bf1..dcde0cf0 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -306,10 +306,9 @@ else (_kdeBootStrapping) # Check the version of kde. KDE4_KDECONFIG_EXECUTABLE was set by FindKDE4 exec_program(${KDE4_KDECONFIG_EXECUTABLE} ARGS "--version" OUTPUT_VARIABLE kdeconfig_output ) - string(REGEX MATCH "KDE: [0-9]+\\.[0-9]+\\.[0-9]+" KDEVERSION "${kdeconfig_output}") - if (KDEVERSION) + if (KDEVERSION) string(REGEX REPLACE "^KDE: " "" KDEVERSION "${KDEVERSION}") # we need at least this version: @@ -319,7 +318,6 @@ else (_kdeBootStrapping) #message(STATUS "KDE_MIN_VERSION=${KDE_MIN_VERSION} found ${KDEVERSION}") macro_ensure_version( ${KDE_MIN_VERSION} ${KDEVERSION} KDE4_INSTALLED_VERSION_OK ) - else (KDEVERSION) message(FATAL_ERROR "Couldn't parse KDE version string from the kde4-config output:\n${kdeconfig_output}") endif (KDEVERSION) @@ -657,6 +655,16 @@ 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) + set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1) +endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) + + + ##################### and now the platform specific stuff ############################ # Set a default build type for single-configuration -- cgit v1.2.1