From 7fb3c6bf3d51b7c2ef490dedba1c4ea69c4b5f28 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 25 Mar 2013 22:26:28 +0100 Subject: [PATCH] Fix the CMake tests with CMake release candidates. The version number parsing needs to handle the reported version string. Change-Id: Ifd34b2c86b21a1c5e4c91a43447468ca6feab8cf Reviewed-by: Oswald Buddenhagen Reviewed-by: Stephen Kelly --- mkspecs/features/ctest_testcase.prf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkspecs/features/ctest_testcase.prf b/mkspecs/features/ctest_testcase.prf index c2d1a6ad22..79adde3446 100644 --- a/mkspecs/features/ctest_testcase.prf +++ b/mkspecs/features/ctest_testcase.prf @@ -18,6 +18,8 @@ isEmpty(CMAKE_VERSION) { CMAKE_VERSION_MAJOR = $$section(CMAKE_VERSION, ., 0, 0) CMAKE_VERSION_MINOR = $$section(CMAKE_VERSION, ., 1, 1) CMAKE_VERSION_PATCH = $$section(CMAKE_VERSION, ., 2, 2) + # CMake can report versions like 2.8.11-rc1, so strip off the rc part. + CMAKE_VERSION_PATCH ~= s,-.*,, VERSION_OK = greaterThan(CMAKE_VERSION_MAJOR, 2) {