From 465da04bcbddffdb4f66d74d5f40907fa23d3e29 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 30 Oct 2018 14:25:57 +0100 Subject: [PATCH] Build and test QtConcurrent Change-Id: I2d4b64d3e9b2cb22c67ce462155e73b5d600fb32 Reviewed-by: Simon Hausmann --- src/CMakeLists.txt | 19 +++++++++++--- src/concurrent/CMakeLists.txt | 25 +++++++++++++++++++ tests/auto/CMakeLists.txt | 2 +- tests/auto/concurrent/CMakeLists.txt | 8 ++++++ .../qtconcurrentfilter/CMakeLists.txt | 14 +++++++++++ .../qtconcurrentiteratekernel/CMakeLists.txt | 12 +++++++++ .../concurrent/qtconcurrentmap/CMakeLists.txt | 20 +++++++++++++++ .../qtconcurrentmedian/CMakeLists.txt | 14 +++++++++++ .../concurrent/qtconcurrentrun/CMakeLists.txt | 18 +++++++++++++ .../qtconcurrentthreadengine/CMakeLists.txt | 12 +++++++++ 10 files changed, 139 insertions(+), 5 deletions(-) create mode 100644 src/concurrent/CMakeLists.txt create mode 100644 tests/auto/concurrent/CMakeLists.txt create mode 100644 tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt create mode 100644 tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt create mode 100644 tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt create mode 100644 tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt create mode 100644 tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt create mode 100644 tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fd9016598e..f81ad05f9d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,9 +44,18 @@ endfunction() find_or_build_bootstrap_names() add_subdirectory(corelib) -add_subdirectory(network) -add_subdirectory(xml) -add_subdirectory(dbus) +if (QT_FEATURE_concurrent) + add_subdirectory(concurrent) +endif() +if (QT_FEATURE_network) + add_subdirectory(network) +endif() +if (QT_FEATURE_xml) + add_subdirectory(xml) +endif() +if (QT_FEATURE_dbus) + add_subdirectory(dbus) +endif() add_subdirectory(tools) if(QT_FEATURE_gui) add_subdirectory(gui) @@ -61,5 +70,7 @@ if(QT_FEATURE_gui) add_subdirectory(platformsupport) add_subdirectory(platformheaders) endif() -add_subdirectory(testlib) +if (QT_FEATURE_testlib) + add_subdirectory(testlib) +endif() add_subdirectory(plugins) diff --git a/src/concurrent/CMakeLists.txt b/src/concurrent/CMakeLists.txt new file mode 100644 index 0000000000..d760844a8c --- /dev/null +++ b/src/concurrent/CMakeLists.txt @@ -0,0 +1,25 @@ +add_qt_module(Concurrent + SOURCES + qtconcurrent_global.h + qtconcurrentcompilertest.h + qtconcurrentexception.h + qtconcurrentfilter.cpp qtconcurrentfilter.h + qtconcurrentfilterkernel.h + qtconcurrentfunctionwrappers.h + qtconcurrentiteratekernel.cpp qtconcurrentiteratekernel.h + qtconcurrentmap.cpp qtconcurrentmap.h + qtconcurrentmapkernel.h + qtconcurrentmedian.h + qtconcurrentreducekernel.h + qtconcurrentrun.cpp qtconcurrentrun.h + qtconcurrentrunbase.h + qtconcurrentstoredfunctioncall.h + qtconcurrentthreadengine.cpp qtconcurrentthreadengine.h + DEFINES + QT_NO_USING_NAMESPACE + QT_NO_FOREACH + LIBRARIES Qt::CorePrivate + PUBLIC_LIBRARIES Qt::Core +) + +add_qt_docs(./doc/qtconcurrent.qdocconf) diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt index 13728bd49b..d9d1b8349f 100644 --- a/tests/auto/CMakeLists.txt +++ b/tests/auto/CMakeLists.txt @@ -42,7 +42,7 @@ if (TARGET Qt::Xml) # add_subdirectory("xml") endif() if (TARGET Qt::Concurrent) -# add_subdirectory("concurrent") + add_subdirectory("concurrent") endif() # add_subdirectory("other") if (TARGET Qt::Widgets) diff --git a/tests/auto/concurrent/CMakeLists.txt b/tests/auto/concurrent/CMakeLists.txt new file mode 100644 index 0000000000..ae1e256bbd --- /dev/null +++ b/tests/auto/concurrent/CMakeLists.txt @@ -0,0 +1,8 @@ +# Generated from concurrent.pro. + +add_subdirectory(qtconcurrentfilter) +add_subdirectory(qtconcurrentiteratekernel) +add_subdirectory(qtconcurrentmap) +add_subdirectory(qtconcurrentmedian) +add_subdirectory(qtconcurrentrun) +add_subdirectory(qtconcurrentthreadengine) diff --git a/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt new file mode 100644 index 0000000000..e4e6884728 --- /dev/null +++ b/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt @@ -0,0 +1,14 @@ +# Generated from qtconcurrentfilter.pro. + +##################################################################### +## tst_qtconcurrentfilter Test: +##################################################################### + +add_qt_test(tst_qtconcurrentfilter + SOURCES + tst_qtconcurrentfilter.cpp + DEFINES + QT_STRICT_ITERATORS + LIBRARIES + Qt::Concurrent +) diff --git a/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt new file mode 100644 index 0000000000..ae3e950af8 --- /dev/null +++ b/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qtconcurrentiteratekernel.pro. + +##################################################################### +## tst_qtconcurrentiteratekernel Test: +##################################################################### + +add_qt_test(tst_qtconcurrentiteratekernel + SOURCES + tst_qtconcurrentiteratekernel.cpp + LIBRARIES + Qt::Concurrent +) diff --git a/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt new file mode 100644 index 0000000000..2158aa7d75 --- /dev/null +++ b/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt @@ -0,0 +1,20 @@ +# Generated from qtconcurrentmap.pro. + +##################################################################### +## tst_qtconcurrentmap Test: +##################################################################### + +add_qt_test(tst_qtconcurrentmap + SOURCES + tst_qtconcurrentmap.cpp + DEFINES + QT_STRICT_ITERATORS + LIBRARIES + Qt::Concurrent +) + +## Scopes: +##################################################################### +# +#extend_target(tst_qtconcurrentmap CONDITION contains(QT_CONFIG, c++1z) +#) diff --git a/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt new file mode 100644 index 0000000000..6e49501d01 --- /dev/null +++ b/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt @@ -0,0 +1,14 @@ +# Generated from qtconcurrentmedian.pro. + +##################################################################### +## tst_qtconcurrentmedian Test: +##################################################################### + +add_qt_test(tst_qtconcurrentmedian + SOURCES + tst_qtconcurrentmedian.cpp + DEFINES + QT_STRICT_ITERATORS + LIBRARIES + Qt::Concurrent +) diff --git a/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt new file mode 100644 index 0000000000..d3ce0d5e4d --- /dev/null +++ b/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qtconcurrentrun.pro. + +##################################################################### +## tst_qtconcurrentrun Test: +##################################################################### + +add_qt_test(tst_qtconcurrentrun + SOURCES + tst_qtconcurrentrun.cpp + LIBRARIES + Qt::Concurrent +) + +## Scopes: +##################################################################### +# +#extend_target(tst_qtconcurrentrun CONDITION contains(QT_CONFIG, c++1z) +#) diff --git a/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt new file mode 100644 index 0000000000..7833f6b7f4 --- /dev/null +++ b/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qtconcurrentthreadengine.pro. + +##################################################################### +## tst_qtconcurrentthreadengine Test: +##################################################################### + +add_qt_test(tst_qtconcurrentthreadengine + SOURCES + tst_qtconcurrentthreadengine.cpp + LIBRARIES + Qt::Concurrent +)