summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-09-18 07:27:43 +0200
committerLiang Qi <liang.qi@qt.io>2019-09-18 11:01:51 +0000
commit09392f99b62dd6c7d4d3b848b18719af60c315c1 (patch)
tree8103bb0e4b140f4dfeae36152da9bd020cde0fc7 /tests
parent078483c9707b039c9480915eb92257c861acd017 (diff)
downloadqtserialport-09392f99b62dd6c7d4d3b848b18719af60c315c1.tar.gz
cmake: Initial CMake build system support
ntddmodm part need port to configure.json way first. Task-number: QTBUG-78165 Change-Id: I4b2f8102b349a4b77378f0e7dc5b397beb91d92c Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt11
-rw-r--r--tests/auto/CMakeLists.txt8
-rw-r--r--tests/auto/qserialport/CMakeLists.txt13
-rw-r--r--tests/auto/qserialportinfo/CMakeLists.txt16
-rw-r--r--tests/auto/qserialportinfoprivate/CMakeLists.txt15
5 files changed, 63 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 0000000..179e8eb
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from tests.pro.
+
+if(NOT TARGET Qt::Test)
+ cmake_minimum_required(VERSION 3.15.0)
+ project(QtSerialPortTests VERSION 6.0.0 LANGUAGES C CXX)
+ find_package(Qt6 ${PROJECT_VERSION} REQUIRED COMPONENTS BuildInternals Core SerialPort Test)
+ find_package(Qt6 ${PROJECT_VERSION} OPTIONAL_COMPONENTS Xml)
+ qt_set_up_standalone_tests_build()
+endif()
+
+qt_build_tests()
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
new file mode 100644
index 0000000..0f7e9e2
--- /dev/null
+++ b/tests/auto/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from auto.pro.
+
+add_subdirectory(qserialport)
+add_subdirectory(qserialportinfo)
+# add_subdirectory(cmake) # special case
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qserialportinfoprivate)
+endif()
diff --git a/tests/auto/qserialport/CMakeLists.txt b/tests/auto/qserialport/CMakeLists.txt
new file mode 100644
index 0000000..184107f
--- /dev/null
+++ b/tests/auto/qserialport/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qserialport.pro.
+
+#####################################################################
+## tst_qserialport Binary:
+#####################################################################
+
+add_qt_test(tst_qserialport
+ SOURCES
+ tst_qserialport.cpp
+ PUBLIC_LIBRARIES
+ Qt::SerialPort
+ Qt::Test
+)
diff --git a/tests/auto/qserialportinfo/CMakeLists.txt b/tests/auto/qserialportinfo/CMakeLists.txt
new file mode 100644
index 0000000..20a2df0
--- /dev/null
+++ b/tests/auto/qserialportinfo/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qserialportinfo.pro.
+
+#####################################################################
+## tst_qserialportinfo Binary:
+#####################################################################
+
+add_qt_test(tst_qserialportinfo
+ SOURCES
+ tst_qserialportinfo.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+ Qt::SerialPort # special case
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/qserialportinfoprivate/CMakeLists.txt b/tests/auto/qserialportinfoprivate/CMakeLists.txt
new file mode 100644
index 0000000..6a0a055
--- /dev/null
+++ b/tests/auto/qserialportinfoprivate/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qserialportinfoprivate.pro.
+
+#####################################################################
+## tst_qserialportinfoprivate Binary:
+#####################################################################
+
+add_qt_test(tst_qserialportinfoprivate
+ SOURCES
+ tst_qserialportinfoprivate.cpp
+ LIBRARIES
+ Qt::SerialPortPrivate
+ PUBLIC_LIBRARIES
+ Qt::SerialPort
+ Qt::Test
+)