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>
This commit is contained in:
parent
38db7b1464
commit
9a50333dd0
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user