qt5base-lts/tests/auto/tools/qmake
Alexandru Croitor 815f31799c CMake: Fix tst_qmake to work for configs with cross-compiled tools
When cross-building Qt with CMake to target qemu configs in the CI,
we specify the -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON option to also
cross-build tools (like qmake).

In this case, $prefix/bin/qmake points to the cross-compiled qmake,
and the shell script that wraps the host qmake is called
$prefix/bin/host-qmake instead.

In such a scenario, tst_qmake ends up running the cross-compiled
qmake, which thinks that it's being run on device (via user-space
qemu emulation) and doesn't specify the sysroot when computing include
paths, link paths, etc. This causes the test building to fail in
various ways.

To fix the test, check for the existence of the host-qmake wrapper,
and if it exsists use it instead.

Task-number: QTBUG-86053
Change-Id: Iaa4afdf11b17f23abef873dd15b1ed950126ab8c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-10-24 13:02:54 +02:00
..
testdata CMake: Fix tst_qmake::resources() on Windows 2020-06-26 21:24:50 +02:00
.gitignore Moved autotests in category 'tools' into new directory structure 2011-09-12 10:08:29 +02:00
.prev_CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
BLACKLIST CMake: Skip / ignore failing tests on CMake platforms 2020-07-01 14:55:29 +02:00
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
qmake.pro Remove superfluous define from tst_qmake 2020-06-26 21:24:52 +02:00
testcompiler.cpp Merge remote-tracking branch 'origin/5.13' into dev 2019-08-16 01:00:33 +02:00
testcompiler.h Merge remote-tracking branch 'origin/5.13' into dev 2019-08-16 01:00:33 +02:00
tst_qmake.cpp CMake: Fix tst_qmake to work for configs with cross-compiled tools 2020-10-24 13:02:54 +02:00