mirror of https://github.com/dotnet/runtime
improve cmake version detection (#35593)
This commit is contained in:
parent
d51bdd6d76
commit
49ecdbd24c
|
@ -53,7 +53,7 @@ check_prereqs()
|
|||
|
||||
function version { echo "$@" | awk -F. '{ printf("%d%02d%02d\n", $1,$2,$3); }'; }
|
||||
|
||||
local cmake_version="$(cmake --version | awk '/^cmake version [0-9]+\.[0-9]+\.[0-9]+$/ {print $3}')"
|
||||
local cmake_version="$(cmake --version | awk '/^cmake.* version [0-9]+\.[0-9]+\.[0-9]+$/ {print $3}')"
|
||||
|
||||
if [[ "$(version "$cmake_version")" -lt "$(version 3.14.2)" ]]; then
|
||||
echo "Please install CMake 3.14.2 or newer from http://www.cmake.org/download/ or https://apt.kitware.com and ensure it is on your path."; exit 1;
|
||||
|
|
Loading…
Reference in New Issue