Details
-
User Story
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
fc08a07a0 (dev), 3946e7af6 (6.8)
Description
When using an in source build and the Ninja generator, the paths encoded in build.ninja are relative. This in turn causes the the builtin __FILE__ compiler intrinsic to have a relative file path instead of an absolute one.
As far as we know, this affects the QT_SET_MAIN_SOURCE_PATH setup for every test we run. There can be further ramifications depending on whether we always expect __FILE__ to be an absolute path.
There is an upstream bug report about this issue, which mentions that Ninja is the reason why absolute paths can not be used everywhere.
Currently the workaround is to use out of source builds, which is the recommended practice when using CMake.
Attachments
Issue Links
- relates to
-
QTBUG-95268 test_QT_TESTCASE_BUILDDIR fails when built with CMake 3.21
- Open
-
QTBUG-96513 CI: qmake examples should not be built from tainted source tree
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-82820 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
293480,10 | CMake: Build standalone tests out of source in Coin | dev | qt/qtbase | Status: MERGED | +2 | 0 |
293739,4 | CMake: Warn about ninja in-source builds | dev | qt/qtbase | Status: DEFERRED | +2 | 0 |
293823,9 | CMake: Move all CMake Coin builds to be out-of-source | dev | qt/qtbase | Status: MERGED | +2 | 0 |
595288,6 | coin: Move cross-compilation build directories outside of sources | dev | qt/qtbase | Status: MERGED | +2 | 0 |
596405,2 | coin: Move cross-compilation build directories outside of sources | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |