configure: append any unknown compileTest arguments to the qmake command-line

This allows setting of variables, like FOO=bar.

Change-Id: Ib306f8f647014b399b87ffff13f1d9e6a10fa2f8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Thiago Macieira 2015-07-17 14:41:48 -07:00
parent a1ad9a74eb
commit e79200bf7f

View File

@ -16,6 +16,7 @@ INCLUDEPATH=""
CXXFLAGS="$SYSROOT_FLAG" CXXFLAGS="$SYSROOT_FLAG"
MAC_ARCH_CXXFLAGS="" MAC_ARCH_CXXFLAGS=""
MAC_ARCH_LFLAGS="" MAC_ARCH_LFLAGS=""
QMAKE_ARGS=
while [ "$#" -gt 0 ]; do while [ "$#" -gt 0 ]; do
PARAM=$1 PARAM=$1
case $PARAM in case $PARAM in
@ -51,7 +52,9 @@ while [ "$#" -gt 0 ]; do
CXXFLAGS="$CXXFLAGS $PARAM \"$2\"" CXXFLAGS="$CXXFLAGS $PARAM \"$2\""
shift shift
;; ;;
*) ;; *)
QMAKE_ARGS="$QMAKE_ARGS $PARAM"
;;
esac esac
shift shift
done done
@ -67,7 +70,7 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1
# Make sure output from possible previous tests is gone # Make sure output from possible previous tests is gone
rm -f "$EXE" "${EXE}.exe" rm -f "$EXE" "${EXE}.exe"
set -- "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release app_bundle lib_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" set -- "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release app_bundle lib_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" $QMAKE_ARGS "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
if [ "$VERBOSE" = "yes" ]; then if [ "$VERBOSE" = "yes" ]; then
OUTDIR=$OUTDIR "$@" && $MAKE && SUCCESS=yes OUTDIR=$OUTDIR "$@" && $MAKE && SUCCESS=yes
else else