aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-02-20 00:00:32 +0000
committerAlexander Neundorf <neundorf@kde.org>2008-02-20 00:00:32 +0000
commit493aa49d3e73cf0a191f5e13afd822dfbfe8fd79 (patch)
tree49357d8bde1c8ec9976b4eff547c69ea786b9464 /modules
parent648f2aee9796d2e2b5827fb5346c65e581504632 (diff)
downloadextra-cmake-modules-493aa49d3e73cf0a191f5e13afd822dfbfe8fd79.tar.gz
extra-cmake-modules-493aa49d3e73cf0a191f5e13afd822dfbfe8fd79.tar.bz2
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
Diffstat (limited to 'modules')
-rw-r--r--modules/FindKDE4Internal.cmake14
1 files changed, 11 insertions, 3 deletions
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