diff --git a/support/dependencies/check-host-cmake.sh b/support/dependencies/check-host-cmake.sh index fadeae9f6b..c7aa16f48d 100755 --- a/support/dependencies/check-host-cmake.sh +++ b/support/dependencies/check-host-cmake.sh @@ -6,6 +6,9 @@ major_min="${1%.*}" minor_min="${1#*.}" +major_max="4" +minor_max="0" + shift for candidate; do @@ -32,6 +35,12 @@ for candidate; do major="${version%.*}" minor="${version#*.}" + if [ ${major} -gt ${major_max} ]; then + continue + elif [ ${major} -eq ${major_max} -a ${minor} -ge ${minor_max} ]; then + continue + fi + if [ ${major} -gt ${major_min} ]; then echo "${cmake}" exit