OSDN Git Service

build auto tests that depend on thread support conditionally
authorIvailo Monev <xakepa10@laimg.moc>
Sun, 28 Jul 2019 19:49:42 +0000 (19:49 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Sun, 28 Jul 2019 19:49:42 +0000 (19:49 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
tests/auto/qmutex/CMakeLists.txt
tests/auto/qthread/CMakeLists.txt
tests/auto/qthreadpool/CMakeLists.txt
tests/auto/qwaitcondition/CMakeLists.txt

index 0256e8f..3cf667a 100644 (file)
@@ -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()
index 4101dda..751c84d 100644 (file)
@@ -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()
index 9d8d18d..0036e5e 100644 (file)
@@ -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()
index 442efc1..c7c50de 100644 (file)
@@ -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()