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 <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
Stephen Kelly 2013-03-25 22:26:28 +01:00 committed by The Qt Project
parent be431cc50a
commit 7fb3c6bf3d

View File

@ -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) {