Require CMake 3.10

This commit is contained in:
Romain Guy
2019-03-11 14:32:50 -07:00
parent 79dec2f8b5
commit eda6ea64c8
2 changed files with 5 additions and 4 deletions

View File

@@ -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)

View File

@@ -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