Merge remote-tracking branch 'upstream/master' into opm-parser-integrate

This commit is contained in:
Joakim Hove 2013-11-27 14:07:36 +01:00
commit 44e02ead25

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# where is the source tree located by default relative to here # where is the source tree located by default relative to here
srcdir=$(dirname $(dirname $(dirname "$0"))) srcdir=$(dirname "$(dirname "$(dirname "$0")")")
# display help text # display help text
usage () { usage () {
@ -94,7 +94,7 @@ EOF
# warn only if option checking is enabled # warn only if option checking is enabled
invalid_opt () { invalid_opt () {
if [ "${option_check}" = "yes" ]; then if [ "${option_check}" = "yes" ]; then
unknown_arg $@ unknown_arg "$@"
fi fi
} }
@ -162,7 +162,7 @@ fi
# helper routine # helper routine
uppercase () { uppercase () {
echo "$@" | tr [a-z-] [A-Z_] echo "$@" | tr "a-z-" "A-Z_"
} }
for OPT in "$@"; do for OPT in "$@"; do
@ -426,7 +426,7 @@ for OPT in "$@"; do
shared="OFF" shared="OFF"
;; ;;
*) *)
invalid_opt --enable-${kind} invalid_opt "--enable-${kind}"
shared="" shared=""
;; ;;
esac esac
@ -438,7 +438,7 @@ for OPT in "$@"; do
*) *)
# remove everything *after* the equal sign # remove everything *after* the equal sign
arg=${OPTARG%=*} arg=${OPTARG%=*}
invalid_arg --$arg invalid_arg "--$arg"
exit 1 exit 1
;; ;;
esac esac
@ -448,7 +448,7 @@ for OPT in "$@"; do
VARS+=("$OPT") VARS+=("$OPT")
;; ;;
*) *)
invalid_arg $OPT invalid_arg "$OPT"
exit 1 exit 1
;; ;;
esac esac
@ -484,12 +484,12 @@ for a in "${VARS[@]}"; do
CC=*) CC=*)
# special processing for compiler options # special processing for compiler options
a=${a#CC=} a=${a#CC=}
[ -x "$(command -v $a)" ] && a=$(command -v "$a") [ -x "$(command -v "$a")" ] && a=$(command -v "$a")
c_compiler=" -DCMAKE_C_COMPILER=\"${a/\"/\\\"}\"" c_compiler=" -DCMAKE_C_COMPILER=\"${a/\"/\\\"}\""
;; ;;
CXX=*) CXX=*)
a=${a#CXX=} a=${a#CXX=}
[ -x "$(command -v $a)" ] && a=$(command -v "$a") [ -x "$(command -v "$a")" ] && a=$(command -v "$a")
cxx_compiler=" -DCMAKE_CXX_COMPILER=\"${a/\"/\\\"}\"" cxx_compiler=" -DCMAKE_CXX_COMPILER=\"${a/\"/\\\"}\""
;; ;;
CFLAGS=*) CFLAGS=*)
@ -502,7 +502,7 @@ for a in "${VARS[@]}"; do
;; ;;
FC=*) FC=*)
a=${a#FC=} a=${a#FC=}
[ -x "$(command -v $a)" ] && a=$(command -v "$a") [ -x "$(command -v "$a")" ] && a=$(command -v "$a")
fort_compiler=" -DCMAKE_Fortran_COMPILER=\"${a/\"/\\\"}\"" fort_compiler=" -DCMAKE_Fortran_COMPILER=\"${a/\"/\\\"}\""
;; ;;
FFLAGS=*) FFLAGS=*)
@ -534,5 +534,5 @@ fi
# pass everything on to CMake # pass everything on to CMake
CMDLINE="${ENVVARS}${CMAKE_COMMAND} \"${srcdir}\" ${use_ninja}\"-DCMAKE_INSTALL_PREFIX=$prefix\"${buildtype}${pch_use}${silent_rules}${debug_loc}${use_openmp}${use_mpi}${use_lto}${use_runpath}${use_tests}${use_samples}${use_underscoring}${c_compiler}${c_opts}${cxx_compiler}${cxx_opts}${fort_compiler}${fort_opts}${boost_opts}${buildname}${site} ${FEATURES}" CMDLINE="${ENVVARS}${CMAKE_COMMAND} \"${srcdir}\" ${use_ninja}\"-DCMAKE_INSTALL_PREFIX=$prefix\"${buildtype}${pch_use}${silent_rules}${debug_loc}${use_openmp}${use_mpi}${use_lto}${use_runpath}${use_tests}${use_samples}${use_underscoring}${c_compiler}${c_opts}${cxx_compiler}${cxx_opts}${fort_compiler}${fort_opts}${boost_opts}${buildname}${site} ${FEATURES}"
echo --- calling CMake --- echo --- calling CMake ---
echo ${CMDLINE} echo "${CMDLINE}"
eval exec ${CMDLINE} eval exec "${CMDLINE}"