diff --git a/cmake/Scripts/configure b/cmake/Scripts/configure index 4d571010..21acc02a 100755 --- a/cmake/Scripts/configure +++ b/cmake/Scripts/configure @@ -145,7 +145,7 @@ VARS=() # command that launches cmake; look for 2.8 if available if [ "${CMAKE_COMMAND}" = "" ]; then - if which cmake28 >/dev/null 2>&1; then + if test -n "$(command -v cmake28)"; then CMAKE_COMMAND=cmake28 else CMAKE_COMMAND=cmake @@ -453,11 +453,11 @@ for a in "${VARS[@]}"; do ;; CC=*) # special processing for compiler options - a=${a#CC=} + a=$(command -v ${a#CC=}) c_compiler=" -DCMAKE_C_COMPILER=\"${a/\"/\\\"}\"" ;; CXX=*) - a=${a#CXX=} + a=$(command -v ${a#CXX=}) cxx_compiler=" -DCMAKE_CXX_COMPILER=\"${a/\"/\\\"}\"" ;; CFLAGS=*) @@ -469,7 +469,7 @@ for a in "${VARS[@]}"; do cxx_opts=" -DCMAKE_CXX_FLAGS=\"${a/\"/\\\"}\"" ;; FC=*) - a=${a#FC=} + a=$(command -v ${a#FC=}) fort_compiler=" -DCMAKE_Fortran_COMPILER=\"${a/\"/\\\"}\"" ;; FFLAGS=*)