qt5base-lts/tests/auto/corelib/thread
Alexandru Croitor 92ee9bd6b8 CMake: Properly handle CONFIG += thread aka Threads::Threads
mkspecs/features/qt.prf adds a dependency on the system threading
library if the Qt Core thread feature is enabled. Because qt.prf is
loaded by any public or internal Qt project, it's essentially a public
dependency for any Qt consumer.

To mimic that in CMake, we check if the thread feature is enabled, and
and set the Threads::Threads library as a dependency of Qt6::Platform,
which is a public target used by all Qt modules and plugins and Qt
consumers.

We also need to create a Qt6Dependencies.cmake file so we
find_package(Threads) every time find_package(Qt6) is called.

For the .prl files to be usable, we have to filter out some
CMake implementation specific directory separator tokens
'CMAKE_DIRECTORY_ID_SEP' aka '::@', which are added because we call
target_link_libraries() with a target created in a different scope
(I think).

As a result of this change, we shouldn't have to hardcode
Threads::Threads in other projects, because it's now a global public
dependency.

Task-number: QTBUG-85801
Task-number: QTBUG-85877
Change-Id: Ib5d662c43b28e63f7da49d3bd77d0ad751220b31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-08-06 19:15:39 +02:00
..
qatomicint Disable warning about self-move and self-assign-overload 2020-07-26 18:06:34 +02:00
qatomicinteger CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qatomicpointer CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qfuture Introduce swap functions for QPromise/QFutureInterface 2020-08-03 16:47:31 +02:00
qfuturesynchronizer CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qfuturewatcher QtConcurrent: Get rid of multi-inheritance inside RunFunctionTaskBase 2020-07-14 14:52:08 +02:00
qmutex Fix warnings about unused variables and functions in tests 2020-07-26 18:06:46 +02:00
qmutexlocker CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qpromise CMake: Properly handle CONFIG += thread aka Threads::Threads 2020-08-06 19:15:39 +02:00
qreadlocker CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qreadwritelock CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qresultstore CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qsemaphore CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qthread CMake: Properly handle CONFIG += thread aka Threads::Threads 2020-08-06 19:15:39 +02:00
qthreadonce CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qthreadpool CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qthreadstorage CMake: Properly handle CONFIG += thread aka Threads::Threads 2020-08-06 19:15:39 +02:00
qwaitcondition CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qwritelocker CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
.prev_CMakeLists.txt CMake: Skip / ignore failing tests on CMake platforms 2020-07-01 14:55:29 +02:00
CMakeLists.txt CMake: Skip / ignore failing tests on CMake platforms 2020-07-01 14:55:29 +02:00
thread.pro Add QPromise implementation 2020-06-09 17:21:38 +03:00