Fix cxx11_future test

The test incorrectly failed on Linux because of a linker error
(unresolved symbol pthread_create()).

Fix by adding Threads::Threads, which provides -lpthread, where
needed.

Amends ced943e936e335a16e9b479a2010e5bbee1af4f1.

Fixes: QTBUG-130621
Change-Id: I25f7a5d6528576700628a85953c2e5c1a88dfe41
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 129523280cb7a6c9af5c6edc2da09bb333bc7833)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-10-28 12:20:49 +01:00 committed by Qt Cherry-pick Bot
parent 65c2600b7b
commit ae01520633

View File

@ -470,6 +470,7 @@ const auto backtrace = std::stacktrace::current();
# <future>
qt_config_compile_test(cxx_std_async_noncopyable
LABEL "std::async() NonCopyable"
LIBRARIES Threads::Threads
CODE
"// Calling std::async with lambda which takes non-copyable argument causes compilation error on
// some platforms (VxWorks 24.03 and older with C++17-compatibility for example)