From e79200bf7f8dbd4f8aa03c8be07a6dfc4328fa50 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 17 Jul 2015 14:41:48 -0700 Subject: [PATCH] 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 --- config.tests/unix/compile.test | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test index 103321e451..a1dbadd677 100755 --- a/config.tests/unix/compile.test +++ b/config.tests/unix/compile.test @@ -16,6 +16,7 @@ INCLUDEPATH="" CXXFLAGS="$SYSROOT_FLAG" MAC_ARCH_CXXFLAGS="" MAC_ARCH_LFLAGS="" +QMAKE_ARGS= while [ "$#" -gt 0 ]; do PARAM=$1 case $PARAM in @@ -51,7 +52,9 @@ while [ "$#" -gt 0 ]; do CXXFLAGS="$CXXFLAGS $PARAM \"$2\"" shift ;; - *) ;; + *) + QMAKE_ARGS="$QMAKE_ARGS $PARAM" + ;; esac shift done @@ -67,7 +70,7 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1 # Make sure output from possible previous tests is gone 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 OUTDIR=$OUTDIR "$@" && $MAKE && SUCCESS=yes else