From 49555e3ac956d9f90b01d136c510206cf50d0a8b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 19 Oct 2012 16:59:53 +0200 Subject: 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 #include #include #include 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 --- tests/auto/cmake/CMakeLists.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tests/auto/cmake/CMakeLists.txt') 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} +) -- cgit v1.2.3