From 8fff078776dcd4d94e8b36d479cce1215c53f905 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 28 Jul 2019 19:49:42 +0000 Subject: [PATCH] build auto tests that depend on thread support conditionally Signed-off-by: Ivailo Monev --- tests/auto/qmutex/CMakeLists.txt | 8 +++++--- tests/auto/qthread/CMakeLists.txt | 8 +++++--- tests/auto/qthreadpool/CMakeLists.txt | 8 +++++--- tests/auto/qwaitcondition/CMakeLists.txt | 8 +++++--- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/tests/auto/qmutex/CMakeLists.txt b/tests/auto/qmutex/CMakeLists.txt index 0256e8fbe..3cf667aad 100644 --- a/tests/auto/qmutex/CMakeLists.txt +++ b/tests/auto/qmutex/CMakeLists.txt @@ -1,3 +1,5 @@ -katie_test(tst_qmutex - ${CMAKE_CURRENT_SOURCE_DIR}/tst_qmutex.cpp -) +if(WITH_THREADS AND THREADS_FOUND) + katie_test(tst_qmutex + ${CMAKE_CURRENT_SOURCE_DIR}/tst_qmutex.cpp + ) +endif() diff --git a/tests/auto/qthread/CMakeLists.txt b/tests/auto/qthread/CMakeLists.txt index 4101ddaaf..751c84d1b 100644 --- a/tests/auto/qthread/CMakeLists.txt +++ b/tests/auto/qthread/CMakeLists.txt @@ -1,3 +1,5 @@ -katie_test(tst_qthread - ${CMAKE_CURRENT_SOURCE_DIR}/tst_qthread.cpp -) +if(WITH_THREADS AND THREADS_FOUND) + katie_test(tst_qthread + ${CMAKE_CURRENT_SOURCE_DIR}/tst_qthread.cpp + ) +endif() diff --git a/tests/auto/qthreadpool/CMakeLists.txt b/tests/auto/qthreadpool/CMakeLists.txt index 9d8d18d5f..0036e5e25 100644 --- a/tests/auto/qthreadpool/CMakeLists.txt +++ b/tests/auto/qthreadpool/CMakeLists.txt @@ -1,3 +1,5 @@ -katie_test(tst_qthreadpool - ${CMAKE_CURRENT_SOURCE_DIR}/tst_qthreadpool.cpp -) +if(WITH_THREADS AND THREADS_FOUND) + katie_test(tst_qthreadpool + ${CMAKE_CURRENT_SOURCE_DIR}/tst_qthreadpool.cpp + ) +endif() diff --git a/tests/auto/qwaitcondition/CMakeLists.txt b/tests/auto/qwaitcondition/CMakeLists.txt index 442efc117..c7c50de94 100644 --- a/tests/auto/qwaitcondition/CMakeLists.txt +++ b/tests/auto/qwaitcondition/CMakeLists.txt @@ -1,3 +1,5 @@ -katie_test(tst_qwaitcondition - ${CMAKE_CURRENT_SOURCE_DIR}/tst_qwaitcondition.cpp -) +if(WITH_THREADS AND THREADS_FOUND) + katie_test(tst_qwaitcondition + ${CMAKE_CURRENT_SOURCE_DIR}/tst_qwaitcondition.cpp + ) +endif() -- 2.11.0