From cb08b40976150b679d2978f82e3b7ba7c1732780 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sat, 16 Sep 2017 12:54:45 +0100 Subject: Move detection of to a configure test is needed by QThread::create. Instead of a fragile series of preprocessor tests, move its detection to a configure test. This dramatically simplifies the code, but on the other hand ties the availability of QThread::create() to the system used to compile Qt (rather the one used to compile an application). Change-Id: If1b06363379bf29126cfa68f2a0651cbb78a67f7 Reviewed-by: Thiago Macieira --- src/corelib/configure.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/corelib/configure.json') diff --git a/src/corelib/configure.json b/src/corelib/configure.json index 3feda2fffc..51e6d1d391 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -251,6 +251,18 @@ ] } }, + "cxx11_future": { + "label": "C++11 ", + "type": "compile", + "test": { + "include": "future", + "main": [ + "std::future f = std::async([]() { return 42; });", + "(void)f.get();" + ], + "qmake": "unix:LIBS += -lpthread" + } + }, "cxx11_random": { "label": "C++11 ", "type": "compile", @@ -442,6 +454,11 @@ "condition": "features.doubleconversion && libs.doubleconversion", "output": [ "privateFeature" ] }, + "cxx11_future": { + "label": "C++11 ", + "condition": "tests.cxx11_future", + "output": [ "publicFeature" ] + }, "cxx11_random": { "label": "C++11 ", "condition": "tests.cxx11_random", -- cgit v1.2.3