From 82a2d28d841c7f59fa76fae6a67e1712a5fb4740 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 27 Nov 2013 12:22:54 +0100 Subject: [PATCH] CMake: Parse the output of new CMake versions. As of CMake 3.0, the output of `cmake --version` now has a second line showing that it is maintained by Kitware. Change the version parsing to look only at the first line of output. Change-Id: I347de4c376e0bde25a43a38d59587d9b63f6b43a Reviewed-by: Oswald Buddenhagen --- mkspecs/features/ctest_testcase_common.prf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/ctest_testcase_common.prf b/mkspecs/features/ctest_testcase_common.prf index 118eed1e94..a9461eb4ae 100644 --- a/mkspecs/features/ctest_testcase_common.prf +++ b/mkspecs/features/ctest_testcase_common.prf @@ -1,10 +1,11 @@ win32 { - CMAKE_VERSION = $$system(cmake --version 2>NUL) + CMAKE_VERSION = $$system(cmake --version 2>NUL, lines) } else { - CMAKE_VERSION = $$system(cmake --version 2>/dev/null) + CMAKE_VERSION = $$system(cmake --version 2>/dev/null, lines) } +CMAKE_VERSION = $$member(CMAKE_VERSION, 0, 0) check.commands = QMAKE_EXTRA_TARGETS *= check