test/cfg/runtests.sh: Qt test: Fix syntax check when "-fPIC" is required (#1600)

On linux systems (like travis) Qt often seems to be built with the option "reduce_relocations" which requires an application using it to specify the option "-fPIC".
This commit is contained in:
Sebastian 2019-01-14 17:48:04 +01:00 committed by GitHub
parent f0cfe03f7b
commit aa40e374ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -42,6 +42,8 @@ else
QTCONFIG_RETURNCODE=$?
set -e
if [ $QTCONFIG_RETURNCODE -eq 0 ]; then
QTBUILDCONFIG=$(pkg-config --variable=qt_config Qt5Core)
[[ $QTBUILDCONFIG =~ (^|[[:space:]])reduce_relocations($|[[:space:]]) ]] && QTCONFIG="${QTCONFIG} -fPIC"
set +e
echo -e "#include <QString>" | ${CXX} ${CXX_OPT} ${QTCONFIG} -x c++ -
QTCHECK_RETURNCODE=$?