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>
This commit is contained in:
parent
4fbe50e77a
commit
82a2d28d84
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user