Migrate to CMake to build the entire project

This commit is contained in:
Simon Brunel 2020-01-11 19:10:19 +01:00
parent 7f9013a878
commit 6639ea52db
95 changed files with 297 additions and 269 deletions

View File

@ -19,9 +19,9 @@ environment:
ARCH: x64 ARCH: x64
build_script: build_script:
- cmd: qmake qtpromise.pro - cmd: cmake -G "NMake Makefiles"
- cmd: nmake - cmd: cmake --build .
test_script: test_script:
- cmd: nmake check - cmd: cmake --build . --target test

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
/build /build
/dist /dist
/node_modules /node_modules
*.autosave
*.gcno *.gcno
*.gcda *.gcda
*.info *.info

View File

@ -22,14 +22,15 @@ install:
- cd .. - cd ..
before_script: before_script:
- cmake --version
- qmake --version - qmake --version
- lcov --version && gcov --version
- gcc --version && g++ --version - gcc --version && g++ --version
- lcov --version && gcov --version
script: script:
- qmake qtpromise.pro CONFIG+=coverage - cmake -G "Unix Makefiles"
- make -j4 - cmake --build . -- -j12
- make check --quiet - cmake --build . --target test
- lcov -capture --directory . --o coverage.info - lcov -capture --directory . --o coverage.info
- lcov -e coverage.info '**/src/**/*' -o coverage.info - lcov -e coverage.info '**/src/**/*' -o coverage.info

View File

@ -1,15 +1,52 @@
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.8)
if(DEFINED PROJECT_NAME)
set(SUBPROJECT ON)
endif()
project(qtpromise VERSION 0.5.0 LANGUAGES CXX) project(qtpromise VERSION 0.5.0 LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
find_package(Qt5 5.6.0 REQUIRED COMPONENTS Core) find_package(Qt5 5.6.0 REQUIRED COMPONENTS Core)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED on) set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_library(qtpromise INTERFACE) add_library(qtpromise INTERFACE)
add_library(qtpromise::qtpromise ALIAS qtpromise) add_library(qtpromise::qtpromise ALIAS qtpromise)
target_link_libraries(qtpromise INTERFACE Qt5::Core) target_link_libraries(qtpromise INTERFACE Qt5::Core)
target_include_directories(qtpromise INTERFACE "${CMAKE_CURRENT_LIST_DIR}/include") target_include_directories(qtpromise INTERFACE "${CMAKE_CURRENT_LIST_DIR}/include")
add_definitions(
-DQT_DEPRECATED_WARNINGS
-DQT_NO_KEYWORDS
)
# https://github.com/simonbrunel/qtpromise/issues/10
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
add_compile_options(
-Werror
-Wpedantic
-Wall
-Wextra
-Wconversion
-Wsign-conversion
-Wold-style-cast
-Wunused-local-typedefs
-pedantic-errors
)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level
add_compile_options(
/WX
)
endif()
if(NOT SUBPROJECT)
enable_testing()
add_subdirectory(tests)
endif()

View File

@ -0,0 +1,30 @@
function(qtpromise_add_test NAME)
cmake_parse_arguments(_ARG "" "" "SOURCES;LIBRARIES" ${ARGN})
set(_TARGET qtpromise.tests.auto.${NAME})
add_executable(${_TARGET} ${_ARG_SOURCES})
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_link_libraries(${_TARGET} gcov)
target_compile_options(${_TARGET}
PRIVATE
-fprofile-arcs
-ftest-coverage
-O0
-g
)
endif()
target_link_libraries(${_TARGET}
Qt5::Test
qtpromise
qtpromise.tests.utils
${_ARG_LIBRARIES}
)
add_test(NAME ${_TARGET}
COMMAND ${_TARGET}
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
)
endfunction()

View File

@ -1,12 +0,0 @@
TEMPLATE = subdirs
SUBDIRS = \
tests
_qt_creator_ {
SUBDIRS += src
}
OTHER_FILES = \
package/features/*.prf \
include/* \
qtpromise.pri

View File

@ -1,11 +0,0 @@
HEADERS += \
$$PWD/qpromise.h \
$$PWD/qpromise.inl \
$$PWD/qpromise_p.h \
$$PWD/qpromiseconnections.h \
$$PWD/qpromiseexceptions.h \
$$PWD/qpromisefuture.h \
$$PWD/qpromiseglobal.h \
$$PWD/qpromisehelpers.h \
$$PWD/qpromisehelpers_p.h \
$$PWD/qpromiseresolver.h

View File

@ -1,5 +0,0 @@
TEMPLATE = lib
CONFIG += c++11 qt thread warn_on
DEFINES += QT_DEPRECATED_WARNINGS
include(qtpromise.pri)

View File

@ -1,2 +0,0 @@
TEMPLATE = subdirs
SUBDIRS = qtpromise

9
tests/CMakeLists.txt Normal file
View File

@ -0,0 +1,9 @@
find_package(Qt5 5.6.0 REQUIRED
COMPONENTS
Concurrent
Test
)
include(QtPromiseAddTest)
add_subdirectory(auto)

View File

@ -0,0 +1 @@
add_subdirectory(qtpromise)

View File

@ -1,2 +0,0 @@
TEMPLATE = subdirs
SUBDIRS += qtpromise

View File

@ -0,0 +1,11 @@
add_subdirectory(shared)
add_subdirectory(benchmark)
add_subdirectory(deprecations)
add_subdirectory(exceptions)
add_subdirectory(future)
add_subdirectory(helpers)
add_subdirectory(qpromise)
add_subdirectory(qpromiseconnections)
add_subdirectory(requirements)
add_subdirectory(thread)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(benchmark
SOURCES
tst_benchmark.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_benchmark
SOURCES += $$PWD/tst_benchmark.cpp
include(../qtpromise.pri)

View File

@ -0,0 +1,9 @@
# Disable deprecation warnings since we are testing deprecated features.
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
add_compile_options(-Wno-deprecated-declarations)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
add_compile_options(/wd4996)
endif()
add_subdirectory(helpers)
add_subdirectory(qpromise)

View File

@ -1,5 +0,0 @@
include(../qtpromise.pri)
DEFINES -= QT_DEPRECATED_WARNINGS
gcc:QMAKE_CXXFLAGS += -Wno-deprecated-declarations
msvc:QMAKE_CXXFLAGS -= -wd4996

View File

@ -1,3 +0,0 @@
TEMPLATE = subdirs
SUBDIRS += \
helpers

View File

@ -0,0 +1,2 @@
add_subdirectory(qpromise)
add_subdirectory(qpromiseall)

View File

@ -1,4 +0,0 @@
TEMPLATE = subdirs
SUBDIRS += \
qpromise \
qpromiseall

View File

@ -0,0 +1,6 @@
qtpromise_add_test(deprecations.helpers.qpromise
SOURCES
tst_qpromise.cpp
LIBRARIES
Qt5::Concurrent
)

View File

@ -1,5 +0,0 @@
QT += concurrent
TARGET = tst_deprecations_helpers_qpromise
SOURCES += $$PWD/tst_qpromise.cpp
include(../../deprecations.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(deprecations.helpers.qpromiseall
SOURCES
tst_qpromiseall.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_deprecations_helpers_qpromiseall
SOURCES += $$PWD/tst_qpromiseall.cpp
include(../../deprecations.pri)

View File

@ -0,0 +1 @@
add_subdirectory(all)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(deprecations.qpromise.all
SOURCES
tst_all.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_deprecations_qpromise_all
SOURCES += $$PWD/tst_all.cpp
include(../../deprecations.pri)

View File

@ -104,7 +104,7 @@ struct SequenceTester<Sequence<QPromise<void>, Args...>>
void tst_deprecations_qpromise_all::emptySequence() void tst_deprecations_qpromise_all::emptySequence()
{ {
auto p = QPromise<int>::all({}); auto p = QPromise<int>::all(QVector<QPromise<int>>{});
Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<QVector<int>>>::value)); Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<QVector<int>>>::value));
@ -114,7 +114,7 @@ void tst_deprecations_qpromise_all::emptySequence()
void tst_deprecations_qpromise_all::emptySequence_void() void tst_deprecations_qpromise_all::emptySequence_void()
{ {
auto p = QPromise<void>::all({}); auto p = QPromise<void>::all(QVector<QPromise<void>>{});
Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<void>>::value)); Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<void>>::value));
@ -132,7 +132,7 @@ void tst_deprecations_qpromise_all::allPromisesSucceed()
}); });
}); });
auto p = QPromise<int>::all({p0, p2, p1}); auto p = QPromise<int>::all(QVector<QPromise<int>>{p0, p2, p1});
Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<QVector<int>>>::value)); Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<QVector<int>>>::value));
@ -154,7 +154,7 @@ void tst_deprecations_qpromise_all::allPromisesSucceed_void()
}); });
}); });
auto p = QPromise<void>::all({p0, p2, p1}); auto p = QPromise<void>::all(QVector<QPromise<void>>{p0, p2, p1});
Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<void>>::value)); Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<void>>::value));
@ -176,7 +176,7 @@ void tst_deprecations_qpromise_all::atLeastOnePromiseReject()
}); });
}); });
auto p = QPromise<int>::all({p0, p2, p1}); auto p = QPromise<int>::all(QVector<QPromise<int>>{p0, p2, p1});
Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<QVector<int>>>::value)); Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<QVector<int>>>::value));
@ -198,7 +198,7 @@ void tst_deprecations_qpromise_all::atLeastOnePromiseReject_void()
}); });
}); });
auto p = QPromise<void>::all({p0, p2, p1}); auto p = QPromise<void>::all(QVector<QPromise<void>>{p0, p2, p1});
Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<void>>::value)); Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<void>>::value));
@ -216,7 +216,7 @@ void tst_deprecations_qpromise_all::preserveOrder()
auto p1 = QtPromise::resolve(43).delay(100); auto p1 = QtPromise::resolve(43).delay(100);
auto p2 = QtPromise::resolve(44).delay(250); auto p2 = QtPromise::resolve(44).delay(250);
auto p = QPromise<int>::all({p0, p1, p2}); auto p = QPromise<int>::all(QVector<QPromise<int>>{p0, p1, p2});
Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<QVector<int>>>::value)); Q_STATIC_ASSERT((std::is_same<decltype(p), QPromise<QVector<int>>>::value));

View File

@ -1,3 +0,0 @@
TEMPLATE = subdirs
SUBDIRS += \
all

View File

@ -0,0 +1,6 @@
qtpromise_add_test(exceptions
SOURCES
tst_exceptions.cpp
LIBRARIES
Qt5::Concurrent
)

View File

@ -1,5 +0,0 @@
QT += concurrent
TARGET = tst_exceptions
SOURCES += $$PWD/tst_exceptions.cpp
include(../qtpromise.pri)

View File

@ -0,0 +1,6 @@
qtpromise_add_test(future
SOURCES
tst_future.cpp
LIBRARIES
Qt5::Concurrent
)

View File

@ -1,5 +0,0 @@
QT += concurrent
TARGET = tst_future
SOURCES += $$PWD/tst_future.cpp
include(../qtpromise.pri)

View File

@ -0,0 +1,9 @@
add_subdirectory(all)
add_subdirectory(attempt)
add_subdirectory(connect)
add_subdirectory(each)
add_subdirectory(filter)
add_subdirectory(map)
add_subdirectory(reduce)
add_subdirectory(reject)
add_subdirectory(resolve)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(helpers.all
SOURCES
tst_all.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_helpers_all
SOURCES += $$PWD/tst_all.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,6 @@
qtpromise_add_test(helpers.attempt
SOURCES
tst_attempt.cpp
LIBRARIES
Qt5::Concurrent
)

View File

@ -1,5 +0,0 @@
QT += concurrent
TARGET = tst_helpers_attempt
SOURCES += $$PWD/tst_attempt.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(helpers.connect
SOURCES
tst_connect.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_helpers_connect
SOURCES += $$PWD/tst_connect.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(helpers.each
SOURCES
tst_each.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_each
SOURCES += $$PWD/tst_each.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(helpers.filter
SOURCES
tst_filter.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_helpers_filter
SOURCES += $$PWD/tst_filter.cpp
include(../../qtpromise.pri)

View File

@ -1,11 +0,0 @@
TEMPLATE = subdirs
SUBDIRS += \
all \
attempt \
connect \
each \
filter \
map \
reduce \
reject \
resolve

View File

@ -0,0 +1,4 @@
qtpromise_add_test(helpers.map
SOURCES
tst_map.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_helpers_map
SOURCES += $$PWD/tst_map.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(helpers.reduce
SOURCES
tst_reduce.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_helpers_reduce
SOURCES += $$PWD/tst_reduce.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(helpers.reject
SOURCES
tst_reject.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_helpers_reject
SOURCES += $$PWD/tst_reject.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,6 @@
qtpromise_add_test(helpers.resolve
SOURCES
tst_resolve.cpp
LIBRARIES
Qt5::Concurrent
)

View File

@ -1,5 +0,0 @@
QT += concurrent
TARGET = tst_helpers_resolve
SOURCES += $$PWD/tst_resolve.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,14 @@
add_subdirectory(construct)
add_subdirectory(delay)
add_subdirectory(each)
add_subdirectory(fail)
add_subdirectory(filter)
add_subdirectory(finally)
add_subdirectory(map)
add_subdirectory(operators)
add_subdirectory(reduce)
add_subdirectory(resolve)
add_subdirectory(tap)
add_subdirectory(tapfail)
add_subdirectory(then)
add_subdirectory(timeout)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.construct
SOURCES
tst_construct.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_construct
SOURCES += $$PWD/tst_construct.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.delay
SOURCES
tst_delay.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_delay
SOURCES += $$PWD/tst_delay.cpp
include(../../qtpromise.pri)

View File

@ -58,8 +58,8 @@ void tst_qpromise_delay::fulfilled()
// Qt::CoarseTimer (default) Coarse timers try to // Qt::CoarseTimer (default) Coarse timers try to
// keep accuracy within 5% of the desired interval. // keep accuracy within 5% of the desired interval.
// Require accuracy within 6% for passing the test. // Require accuracy within 6% for passing the test.
QVERIFY(elapsed >= 1000 * 0.94); QVERIFY(elapsed >= static_cast<qint64>(1000 * 0.94));
QVERIFY(elapsed <= 1000 * 1.06); QVERIFY(elapsed <= static_cast<qint64>(1000 * 1.06));
} }
void tst_qpromise_delay::rejected() void tst_qpromise_delay::rejected()

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.each
SOURCES
tst_each.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_each
SOURCES += $$PWD/tst_each.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.fail
SOURCES
tst_fail.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_fail
SOURCES += $$PWD/tst_fail.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.filter
SOURCES
tst_filter.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_filter
SOURCES += $$PWD/tst_filter.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.finally
SOURCES
tst_finally.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_finally
SOURCES += $$PWD/tst_finally.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.map
SOURCES
tst_map.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_map
SOURCES += $$PWD/tst_map.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.operators
SOURCES
tst_operators.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_operators
SOURCES += $$PWD/tst_operators.cpp
include(../../qtpromise.pri)

View File

@ -1,16 +0,0 @@
TEMPLATE = subdirs
SUBDIRS += \
construct \
delay \
each \
fail \
filter \
finally \
map \
operators \
reduce \
resolve \
tap \
tapfail \
then \
timeout

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.reduce
SOURCES
tst_reduce.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_reduce
SOURCES += $$PWD/tst_reduce.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.resolve
SOURCES
tst_resolve.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_resolve
SOURCES += $$PWD/tst_resolve.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.tap
SOURCES
tst_tap.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_tap
SOURCES += $$PWD/tst_tap.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.tapfail
SOURCES
tst_tapfail.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_tapfail
SOURCES += $$PWD/tst_tapfail.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.then
SOURCES
tst_then.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_then
SOURCES += $$PWD/tst_then.cpp
include(../../qtpromise.pri)

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromise.timeout
SOURCES
tst_timeout.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromise_timeout
SOURCES += $$PWD/tst_timeout.cpp
include(../../qtpromise.pri)

View File

@ -111,6 +111,6 @@ void tst_qpromise_timeout::timeout()
// Qt::CoarseTimer (default) Coarse timers try to // Qt::CoarseTimer (default) Coarse timers try to
// keep accuracy within 5% of the desired interval. // keep accuracy within 5% of the desired interval.
// Require accuracy within 6% for passing the test. // Require accuracy within 6% for passing the test.
QVERIFY(elapsed >= 2000 * 0.94); QVERIFY(elapsed >= static_cast<qint64>(2000 * 0.94));
QVERIFY(elapsed <= 2000 * 1.06); QVERIFY(elapsed <= static_cast<qint64>(2000 * 1.06));
} }

View File

@ -0,0 +1,4 @@
qtpromise_add_test(qpromiseconnections
SOURCES
tst_qpromiseconnections.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_qpromiseconnections
SOURCES += $$PWD/tst_qpromiseconnections.cpp
include(../qtpromise.pri)

View File

@ -1,28 +0,0 @@
TEMPLATE = app
CONFIG += testcase warn_on
QT += testlib
QT -= gui
DEFINES += QT_DEPRECATED_WARNINGS
# Additional warnings and make all warnings into errors
# https://github.com/simonbrunel/qtpromise/issues/10
gcc:QMAKE_CXXFLAGS += -Werror -Wold-style-cast
msvc:QMAKE_CXXFLAGS += -WX
coverage {
gcc {
message("Code coverage enabled (gcov)")
QMAKE_CXXFLAGS += --coverage -O0 -g
QMAKE_LFLAGS += --coverage -O0 -g
} else {
message("Code coverage only available when compiling with GCC")
}
}
HEADERS += \
$$PWD/shared/data.h \
$$PWD/shared/object.h \
$$PWD/shared/utils.h
include(../../../qtpromise.pri)

View File

@ -1,11 +0,0 @@
TEMPLATE = subdirs
SUBDIRS += \
benchmark \
deprecations \
exceptions \
future \
helpers \
qpromise \
qpromiseconnections \
requirements \
thread

View File

@ -0,0 +1,4 @@
qtpromise_add_test(requirements
SOURCES
tst_requirements.cpp
)

View File

@ -1,4 +0,0 @@
TARGET = tst_requirements
SOURCES += $$PWD/tst_requirements.cpp
include(../qtpromise.pri)

View File

@ -0,0 +1,12 @@
project(qtpromise.tests.utils)
add_library(${PROJECT_NAME} STATIC
data.h
object.h
utils.h
)
target_link_libraries(${PROJECT_NAME} PUBLIC
Qt5::Core
qtpromise
)

View File

@ -0,0 +1,6 @@
qtpromise_add_test(thread
SOURCES
tst_thread.cpp
LIBRARIES
Qt5::Concurrent
)

View File

@ -1,5 +0,0 @@
QT += concurrent
TARGET = tst_thread
SOURCES += $$PWD/tst_thread.cpp
include(../qtpromise.pri)

View File

@ -1,2 +0,0 @@
TEMPLATE = subdirs
SUBDIRS += auto