diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-10-19 16:59:53 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-26 15:23:30 +0200 |
commit | 49555e3ac956d9f90b01d136c510206cf50d0a8b (patch) | |
tree | dd4d68e953cc3d91bad95be05930b9d0e096d525 /tests/auto/cmake | |
parent | 356f3c89b83704591e3c37cf8c322b52d6840763 (diff) |
Add a CMake macro to test module includes
The variations of includes which should work are tested. For example,
in the case of testing the QtCore module and QObject include, the
following includes are generated and compiled:
#include <QObject>
#include <QtCore/QObject>
#include <QtCore>
#include <QtCore/QtCore>
As the private include directories are not available to the compiler,
this also tests that private headers are not included from public ones.
Change-Id: Id03d0fe290c9691e0f7515015892991d1701ab72
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests/auto/cmake')
-rw-r--r-- | tests/auto/cmake/CMakeLists.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index 3217fa3cfd..367832efb6 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -89,3 +89,26 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/test_testlib_definitions/main.cpp" "${CMAKE_CURRENT_BINARY_DIR}/failbuild/test_testlib_no_link_widgets/test_testlib_no_link_widgets/" ) + +set(qt_module_includes + Core QObject + Concurrent QtConcurrentRun + Gui QImage + Widgets QWidget + Network QHostInfo + OpenGL QGLContext + Sql QSqlError + Test QSignalSpy + Xml QDomDocument + PrintSupport QPrintDialog +) + +if (UNIX AND NOT APPLE AND NOT QNXNTO) + list(APPEND qt_module_includes + DBus QDBusConnection + ) +endif() + +test_module_includes( + ${qt_module_includes} +) |