From eda6ea64c8deed2c233eecb50c0e10db73f5ee01 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 11 Mar 2019 14:32:50 -0700 Subject: [PATCH] Require CMake 3.10 --- README.md | 2 +- build.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0c901f3e37..531414aba1 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ and tools. To build Filament, you must first install the following tools: -- CMake 3.12 (or more recent) +- CMake 3.10 (or more recent) - clang 7.0 (or more recent) - [ninja 1.8](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages) (or more recent) diff --git a/build.sh b/build.sh index 0569e7150c..3210b4d059 100755 --- a/build.sh +++ b/build.sh @@ -494,9 +494,10 @@ function validate_build_command { # We allow CI builds to skip CMake version check if [[ "$SKIP_CMAKE_VERSION_CHECK" != "true" ]]; then - if [[ `cmake --version` =~ ([0-9]+)\.([0-9]+)\.[0-9]+ ]]; then - if [[ "${BASH_REMATCH[1]}" -lt "3" ]] || [[ "${BASH_REMATCH[2]}" -lt "12" ]]; then - echo "Error: cmake version 3.12+ is required, ${BASH_REMATCH[1]}.${BASH_REMATCH[2]} installed, exiting" + cmake_version=`cmake --version` + if [[ "$cmake_version" =~ ([0-9]+)\.([0-9]+)\.[0-9]+ ]]; then + if [[ "${BASH_REMATCH[1]}" -lt "3" ]] || [[ "${BASH_REMATCH[2]}" -lt "10" ]]; then + echo "Error: cmake version 3.10+ is required, ${BASH_REMATCH[1]}.${BASH_REMATCH[2]} installed, exiting" exit 1 fi fi