diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-08-16 14:17:38 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-08-16 15:35:40 +0000 |
commit | 9a50333dd03969abb3f09c0f90dcb4afd048e47a (patch) | |
tree | da73d908e3cf83e53bf14f4a232637ea165cafce /mkspecs | |
parent | 38db7b1464d098311e7fea3bfb7d4416496823d2 (diff) |
Fix CMake version resolving
Otherwise 3.8.1 is treated as not recent enough than the required 2.8.3
Change-Id: I198fc7d54e3da935fd163c9b9bb7dc12b986d1c2
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/ctest_testcase_common.prf | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/mkspecs/features/ctest_testcase_common.prf b/mkspecs/features/ctest_testcase_common.prf index 4c7e03f0f7..f5eafc4e0d 100644 --- a/mkspecs/features/ctest_testcase_common.prf +++ b/mkspecs/features/ctest_testcase_common.prf @@ -1,11 +1,15 @@ win32 { - CMAKE_VERSION = $$system(cmake --version 2>NUL, lines) + cmake_version_output = $$system(cmake --version 2>NUL, lines) } else { - CMAKE_VERSION = $$system(cmake --version 2>/dev/null, lines) + cmake_version_output = $$system(cmake --version 2>/dev/null, lines) } -CMAKE_VERSION = $$member(CMAKE_VERSION, 0, 0) +# First line +cmake_version_output = $$first(cmake_version_output) +# Format is "cmake version X.Y.Z" +cmake_version_output = $$split(cmake_version_output) +CMAKE_VERSION = $$last(cmake_version_output) check.commands = QMAKE_EXTRA_TARGETS *= check @@ -26,8 +30,6 @@ isEmpty(CTEST_VERSION) { return() } -CMAKE_VERSION = $$last(CMAKE_VERSION) - !versionAtLeast(CMAKE_VERSION, 2.8.3) { message("cmake $$CMAKE_VERSION is too old for this test.") return() |