diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2013-11-27 12:22:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-27 13:56:02 +0100 |
commit | 82a2d28d841c7f59fa76fae6a67e1712a5fb4740 (patch) | |
tree | 9f11268ba7d820e43793d53d1d9bac5e1b709452 /mkspecs/features | |
parent | 4fbe50e77a8d24d42581cdeabd1e93cb993b0d8d (diff) |
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 <oswald.buddenhagen@digia.com>
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/ctest_testcase_common.prf | 5 |
1 files 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 |