From ae015206331a8e9a01aaedbb4aa8bcfc7dc10bf6 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 28 Oct 2024 12:20:49 +0100 Subject: [PATCH] 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 Reviewed-by: Edward Welbourne (cherry picked from commit 129523280cb7a6c9af5c6edc2da09bb333bc7833) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/configure.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake index 93ccf87e11b..34468bd9aa4 100644 --- a/src/corelib/configure.cmake +++ b/src/corelib/configure.cmake @@ -470,6 +470,7 @@ const auto backtrace = std::stacktrace::current(); # 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)