Skip to content

Commit

Permalink
improve cmake version detection (#35593)
Browse files Browse the repository at this point in the history
  • Loading branch information
wfurt committed Apr 29, 2020
1 parent d51bdd6 commit 49ecdbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eng/native/build-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 49ecdbd

Please sign in to comment.