From 2760ed1eb46bb3c291350342678d1d7e075a483f Mon Sep 17 00:00:00 2001 From: wfurt Date: Tue, 28 Apr 2020 18:09:34 -0700 Subject: [PATCH] improve cmake version detection --- eng/native/build-commons.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh index 14839cbbd9854..640e118096388 100755 --- a/eng/native/build-commons.sh +++ b/eng/native/build-commons.sh @@ -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;