6 major_min
="${version_min%.*}"
7 minor_min
="${version_min#*.}"
9 cmake
=`which ${candidate}`
10 if [ ! -x "${cmake}" ]; then
11 # echo nothing: no suitable cmake found
15 # Extract version X.Y from versions in the form X.Y or X.Y.Z
16 # with X, Y and Z numbers with one or more digits each, e.g.
23 version
="$(${cmake} --version \
24 |sed -r -e '/.* ([[:digit:]]+\.[[:digit:]]+).*$/!d;' \
30 if [ ${major} -gt ${major_min} ]; then
33 if [ ${major} -eq ${major_min} -a ${minor} -ge ${minor_min} ]; then
36 # echo nothing: no suitable cmake found