Add Sql build and tests
Change-Id: I9bf7d61a65950eafcfe6b3ea9c437e353ff7b2ed Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
4769830034
commit
806595c5b6
@ -47,6 +47,9 @@ add_subdirectory(corelib)
|
||||
if (QT_FEATURE_concurrent)
|
||||
add_subdirectory(concurrent)
|
||||
endif()
|
||||
if (QT_FEATURE_sql)
|
||||
add_subdirectory(sql)
|
||||
endif()
|
||||
if (QT_FEATURE_network)
|
||||
add_subdirectory(network)
|
||||
endif()
|
||||
|
37
src/sql/CMakeLists.txt
Normal file
37
src/sql/CMakeLists.txt
Normal file
@ -0,0 +1,37 @@
|
||||
# Generated from sql.pro.
|
||||
|
||||
#####################################################################
|
||||
## Sql Module:
|
||||
#####################################################################
|
||||
|
||||
add_qt_module(Sql
|
||||
SOURCES
|
||||
kernel/qsqlcachedresult.cpp kernel/qsqlcachedresult_p.h
|
||||
kernel/qsqldatabase.cpp kernel/qsqldatabase.h
|
||||
kernel/qsqldriver.cpp kernel/qsqldriver.h kernel/qsqldriver_p.h
|
||||
kernel/qsqldriverplugin.cpp kernel/qsqldriverplugin.h
|
||||
kernel/qsqlerror.cpp kernel/qsqlerror.h
|
||||
kernel/qsqlfield.cpp kernel/qsqlfield.h
|
||||
kernel/qsqlindex.cpp kernel/qsqlindex.h
|
||||
kernel/qsqlnulldriver_p.h
|
||||
kernel/qsqlquery.cpp kernel/qsqlquery.h
|
||||
kernel/qsqlrecord.cpp kernel/qsqlrecord.h
|
||||
kernel/qsqlresult.cpp kernel/qsqlresult.h kernel/qsqlresult_p.h
|
||||
kernel/qtsqlglobal.h kernel/qtsqlglobal_p.h
|
||||
DEFINES
|
||||
QT_NO_USING_NAMESPACE
|
||||
QT_NO_CAST_FROM_ASCII
|
||||
QT_NO_FOREACH
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
)
|
||||
|
||||
extend_target(Sql CONDITION QT_FEATURE_sqlmodel
|
||||
SOURCES
|
||||
models/qsqlquerymodel.cpp models/qsqlquerymodel.h models/qsqlquerymodel_p.h
|
||||
models/qsqlrelationaldelegate.cpp models/qsqlrelationaldelegate.h
|
||||
models/qsqlrelationaltablemodel.cpp models/qsqlrelationaltablemodel.h
|
||||
models/qsqltablemodel.cpp models/qsqltablemodel.h models/qsqltablemodel_p.h
|
||||
)
|
||||
|
||||
add_qt_docs(./doc/qtsql.qdocconf)
|
21
src/sql/configure.cmake
Normal file
21
src/sql/configure.cmake
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
|
||||
#### Inputs
|
||||
|
||||
|
||||
|
||||
#### Libraries
|
||||
|
||||
|
||||
|
||||
#### Tests
|
||||
|
||||
|
||||
|
||||
#### Features
|
||||
|
||||
qt_feature("sqlmodel" PUBLIC
|
||||
LABEL "SQL item models"
|
||||
PURPOSE "Provides item model classes backed by SQL databases."
|
||||
CONDITION QT_FEATURE_itemmodel
|
||||
)
|
@ -1,7 +1,7 @@
|
||||
# Generated from auto.pro.
|
||||
|
||||
if (NOT APPLE_UIKIT)
|
||||
add_subdirectory("corelib")
|
||||
add_subdirectory(corelib)
|
||||
endif()
|
||||
if (QT_FEATURE_dbus)
|
||||
set(run_dbus_tests ON)
|
||||
@ -19,37 +19,37 @@ if (QT_FEATURE_dbus)
|
||||
endif()
|
||||
endif()
|
||||
if(run_dbus_tests)
|
||||
add_subdirectory("dbus")
|
||||
add_subdirectory(dbus)
|
||||
endif()
|
||||
endif()
|
||||
if (NOT APPLE_UIKIT AND TARGET Qt::Gui)
|
||||
add_subdirectory("gui")
|
||||
add_subdirectory(gui)
|
||||
endif()
|
||||
if (TARGET Qt::Network AND NOT WINRT)
|
||||
# add_subdirectory("network")
|
||||
# add_subdirectory(network)
|
||||
endif()
|
||||
if (TARGET Qt::OpenGL AND NOT WINRT)
|
||||
add_subdirectory("opengl")
|
||||
add_subdirectory(opengl)
|
||||
endif()
|
||||
if (QT_FEATURE_sql)
|
||||
# add_subdirectory("sql")
|
||||
if (TARGET Qt::Sql)
|
||||
add_subdirectory(sql)
|
||||
endif()
|
||||
add_subdirectory("testlib")
|
||||
add_subdirectory(testlib)
|
||||
if (NOT CMAKE_CROSSCOMPILE AND QT_FEATURE_process)
|
||||
# add_subdirectory("tools")
|
||||
# add_subdirectory(tools)
|
||||
endif()
|
||||
if (TARGET Qt::Xml)
|
||||
# add_subdirectory("xml")
|
||||
# add_subdirectory(xml)
|
||||
endif()
|
||||
if (TARGET Qt::Concurrent)
|
||||
add_subdirectory("concurrent")
|
||||
add_subdirectory(concurrent)
|
||||
endif()
|
||||
# add_subdirectory("other")
|
||||
# add_subdirectory(other)
|
||||
if (TARGET Qt::Widgets)
|
||||
add_subdirectory("widgets")
|
||||
add_subdirectory(widgets)
|
||||
endif()
|
||||
if (TARGET Qt::PrintSupport)
|
||||
# add_subdirectory("printsupport")
|
||||
# add_subdirectory(printsupport)
|
||||
endif()
|
||||
# add_subdirectory("cmake") ## FIXME: Does this still make sense in this form?
|
||||
# add_subdirectory("installed_cmake") ## FIXME: Does this still make sense in this form?
|
||||
# add_subdirectory(cmake) ## FIXME: Does this still make sense in this form?
|
||||
# add_subdirectory(installed_cmake) ## FIXME: Does this still make sense in this form?
|
||||
|
2
tests/auto/sql/CMakeLists.txt
Normal file
2
tests/auto/sql/CMakeLists.txt
Normal file
@ -0,0 +1,2 @@
|
||||
add_subdirectory(kernel)
|
||||
add_subdirectory(models)
|
9
tests/auto/sql/kernel/CMakeLists.txt
Normal file
9
tests/auto/sql/kernel/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
||||
add_subdirectory(qsqlfield)
|
||||
add_subdirectory(qsqldatabase)
|
||||
add_subdirectory(qsqlerror)
|
||||
add_subdirectory(qsqldriver)
|
||||
add_subdirectory(qsqlquery)
|
||||
add_subdirectory(qsqlrecord)
|
||||
add_subdirectory(qsqlthread)
|
||||
add_subdirectory(qsql)
|
||||
add_subdirectory(qsqlresult)
|
6
tests/auto/sql/kernel/qsql/CMakeLists.txt
Normal file
6
tests/auto/sql/kernel/qsql/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
add_qt_test(tst_qsql
|
||||
SOURCES tst_qsql.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::SqlPrivate
|
||||
)
|
6
tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt
Normal file
6
tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
add_qt_test(tst_qsqldatabase
|
||||
SOURCES tst_qsqldatabase.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::SqlPrivate
|
||||
)
|
6
tests/auto/sql/kernel/qsqldriver/CMakeLists.txt
Normal file
6
tests/auto/sql/kernel/qsqldriver/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
add_qt_test(tst_qsqldriver
|
||||
SOURCES tst_qsqldriver.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::SqlPrivate
|
||||
)
|
1
tests/auto/sql/kernel/qsqlerror/CMakeLists.txt
Normal file
1
tests/auto/sql/kernel/qsqlerror/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
||||
add_qt_test(tst_qsqlerror SOURCES tst_qsqlerror.cpp LIBRARIES Qt::Sql)
|
1
tests/auto/sql/kernel/qsqlfield/CMakeLists.txt
Normal file
1
tests/auto/sql/kernel/qsqlfield/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
||||
add_qt_test(tst_qsqlfield SOURCES tst_qsqlfield.cpp LIBRARIES Qt::Sql)
|
6
tests/auto/sql/kernel/qsqlquery/CMakeLists.txt
Normal file
6
tests/auto/sql/kernel/qsqlquery/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
add_qt_test(tst_qsqlquery
|
||||
SOURCES tst_qsqlquery.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::SqlPrivate
|
||||
)
|
1
tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt
Normal file
1
tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
||||
add_qt_test(tst_qsqlrecord SOURCES tst_qsqlrecord.cpp LIBRARIES Qt::Sql)
|
8
tests/auto/sql/kernel/qsqlresult/CMakeLists.txt
Normal file
8
tests/auto/sql/kernel/qsqlresult/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
add_qt_test(tst_qsqlresult
|
||||
SOURCES
|
||||
testsqldriver.h
|
||||
tst_qsqlresult.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::SqlPrivate
|
||||
)
|
6
tests/auto/sql/kernel/qsqlthread/CMakeLists.txt
Normal file
6
tests/auto/sql/kernel/qsqlthread/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
add_qt_test(tst_qsqlthread
|
||||
SOURCES tst_qsqlthread.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::SqlPrivate
|
||||
)
|
6
tests/auto/sql/models/CMakeLists.txt
Normal file
6
tests/auto/sql/models/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
add_subdirectory(qsqlrelationaltablemodel)
|
||||
add_subdirectory(qsqltablemodel)
|
||||
|
||||
if(TARGET Qt::Widgets)
|
||||
add_subdirectory(qsqlquerymodel)
|
||||
endif()
|
7
tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt
Normal file
7
tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
||||
add_qt_test(tst_qsqlquerymodel
|
||||
SOURCES tst_qsqlquerymodel.cpp
|
||||
LIBRARIES
|
||||
Qt::Widgets
|
||||
Qt::CorePrivate
|
||||
Qt::SqlPrivate
|
||||
)
|
@ -0,0 +1,7 @@
|
||||
add_qt_test(tst_qsqlrelationaldelegate
|
||||
SOURCES tst_qsqlrelationaldelegate.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::SqlPrivate
|
||||
Qt::Widgets
|
||||
)
|
@ -0,0 +1,6 @@
|
||||
add_qt_test(tst_qsqlrelationaltablemodel
|
||||
SOURCES tst_qsqlrelationaltablemodel.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::SqlPrivate
|
||||
)
|
6
tests/auto/sql/models/qsqltablemodel/CMakeLists.txt
Normal file
6
tests/auto/sql/models/qsqltablemodel/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
add_qt_test(tst_qsqltablemodel
|
||||
SOURCES tst_qsqltablemodel.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::SqlPrivate
|
||||
)
|
Loading…
Reference in New Issue
Block a user