summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Enable cmake auto tests for -no-guiKai Pastor2016-03-302-2/+9
| | | | | | | | This change disables tests which require QtGui. Change-Id: Ib647afd086f54536054cb4c0cde5696d762ee8c4 Reviewed-by: Stephen Kelly <steveire@gmail.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Fix QFINDTESTDATA when using cmake ninja generatorStephen Kelly2016-03-195-0/+89
| | | | | | | | | | | | | | | The Qt CI does not have ninja, but the autotest can be used for manual regression finding. cd qtbase/tests/auto/cmake qmake make check cd build cmake . -DHAVE_NINJA=ON ctest -R FINDTESTDATA Change-Id: Ic3f3748f6ab04e37fa5287c59486e5cd46dcabb4 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* CMake: Don't attempt gui-tests if Qt is built with -no-guiStephen Kelly2016-01-181-1/+3
| | | | | Change-Id: I5f327fa1b0c7827535a4b00ca7d0d4281b1eec7b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* CMake: Ensure that -fPIC is passed in tests.Kevin Funk2016-01-112-0/+4
| | | | | | | | CMake newer than 2.8.12 automatically adds the appropriate flag, but CI still runs 2.8.11. Change-Id: Ie61375f2feb54a92c9d8f0ed6ad5227a67343bc5 Reviewed-by: Stephen Kelly <ske@ableton.com>
* CMake: Make all tests link to Qt librariesKevin Funk2016-01-093-3/+4
| | | | | | | | | | | | | | | | | | This is needed as of commit v5.6.0-beta1~483 (Add an automatic use of the ELF-versioned QtCore symbol, 2015-10-20). Even if a translation unit only contains #include <QtCore/QString> int main(int,char**) { return 0; } it must link to QtCore which provides the qt_version_tag symbol. Change-Id: I827c0a7403320e7e5b384d8608face20fcecdaea Reviewed-by: Stephen Kelly <ske@ableton.com>
* Prospective fix for running cmake tests with -no-widgetsSimon Hausmann2016-01-071-1/+1
| | | | | | | Don't try to run test_interface when Qt is configured without QtWidgets. Change-Id: If6c376c250215c1d639b06881d16c0141091f288 Reviewed-by: Stephen Kelly <ske@ableton.com>
* CMake: Fix regression with quoted OPTIONS parameterAndré Klitzing2015-03-111-0/+3
| | | | | | | If a parameter contains quotes the check for "-binary" fails. Change-Id: I27148b590d85291a93f1992dfd277fb857bec6e2 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* Update text to the new license headerSergio Ahumada2015-02-121-6/+6
| | | | | | Change-Id: I643049a865b0a8936e132e12f7845d5527f4f808 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: André Klitzing <aklitzing@gmail.com>
* CMake: Introduce qt5_add_binary_resourcesA. Klitzing2015-02-116-0/+79
| | | | | | | | | | | Optional parameter DESTINATION to set target rcc file Example: qt5_add_binary_resources(GenerateFixture "fixture.qrc") Task-number: QTBUG-41728 Change-Id: I9dc2fe8e7d5e9ad3873b89f75ab84a2a1b9d1d29 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* Update copyright headersJani Heikkinen2015-02-1137-222/+222
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Fix cmake test_moc_macro_target with namespaceFrederik Gladhorn2014-12-301-0/+6
| | | | | | | | | | | The interface macro needs to be in the Qt namespace, otherwise the template specialization in Q_DECLARE_INTERFACE fails. Task-number: QTBUG-41959 Change-Id: I818da5ba8460219d73c0d248ee410ac92f7498f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: Stephen Kelly <steveire@gmail.com>
* Update license headers and add new license filesMatti Paaso2014-09-2437-666/+370
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix cmake-test for Dynamic OpenGL.Friedemann Kleint2014-08-051-12/+19
| | | | | Change-Id: I604501d07b4728c5158e88a6760b9f1e31311991 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* purge vestiges of opengl es 1 supportOswald Buddenhagen2014-04-042-6/+2
| | | | | | | | amends 0d5170256c1. Change-Id: Ifa178d38f602bb7c66ef13334673ff47e332af5b Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Increase CI timeout for cmake tests.Friedemann Kleint2014-03-061-0/+1
| | | | | | Change-Id: I1711f99f9e46f1d195684e3c3a714b00618dca2e Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Teach CMake about Qt 5 plugins.Stephen Kelly2013-09-101-0/+27
| | | | | Change-Id: Idd3225759f9f5ec620f79e29035eb176f965bef7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* CMake: Allow specifying a TARGET in invocations of macros.Stephen Kelly2013-08-216-0/+245
| | | | | | | | | | | | Forward-port of 9ce60ff509c4ff27fe861fc5b2080f50897a68c4 (Qt4Macros: Allow specifying a TARGET in invokations of macros., 2013-02-26) from cmake.git. This causes the INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS to be used from the specified target when running moc. Change-Id: I868a35ade3c6b059e64d226291cf2046709d86d4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Populate INTERFACE_LINK_LIBRARIES property in the cmake files.Stephen Kelly2013-08-215-0/+183
| | | | | | | | This is new in CMake 2.8.12 and replaces the old properties matching IMPORTED_INTERFACE_LINK_LIBRARIES_<CONFIG>. Change-Id: I5d4c454972f2535f6792e95718c73d80c56ac24c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Don't check for the existence of private include directories.Stephen Kelly2013-07-221-1/+1
| | | | | | | | | | | Some packagers don't want to install the private headers. Check the existence of private headers only if the 'Private' component is specified when finding the package. Task-number: QTBUG-32466 Change-Id: I1fdbfb25e8ce485cd051564b937f766b2733741a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Only expect EGL libraries in the cmake files if Qt is configured to use it.Stephen Kelly2013-05-071-1/+1
| | | | | | Change-Id: Ida382a80dba882bbeb920756adc0c16321efe37e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Run the CMake tests with QPrinter, not QPrintDialog.Stephen Kelly2013-04-241-1/+1
| | | | | | | | QPrinter is not implemented on android, so the test fails to link there. Change-Id: I10ca0179323362a9c9f74325332043c968d67d3c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Enable OpenGL library detection for mac.Stephen Kelly2013-04-241-5/+3
| | | | | Change-Id: If99d3faf2b08ac5109d619ff69efdaa3857c007f Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add IMPORTED targets for the GL libraries used by Qt.Stephen Kelly2013-04-225-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | There may be multiple libraries specified in the mkspec, such as EGL and Mali, as used in devices/linux-sh4-stmicro-ST7108-g++, so create an imported target for each one. Also populate the Qt5Gui_EGL_LIBS variable with all created imported targets. Similar variables are created for the used OPENGL implementation. In the case of using the packaged ANGLE library, we already know the exact locations of the binaries. This makes it possible for third parties to use the same GL implementation as used by the Qt build itself. As these are used only privately by QtGui, they are also added to the DEPENDENT_LIBRARIES of that target so that they are found for rpath-link usage. On some platforms (eg Raspberry Pi), multiple include directories must be set to include egl.h, as the headers it includes for vcos are a bit scattered. Task-number: QTBUG-29132 Change-Id: I1126da3d37cd51c88d3670347c8b6405b285efb5 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Update test exclusion following bug fix in recent cmake versions.Stephen Kelly2013-04-171-2/+2
| | | | | | Change-Id: I8174ca78b4e2d8b4344278acf8ca4b0db3115d1a Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Test that the CMake files create appropriate version variables.Stephen Kelly2013-04-051-0/+10
| | | | | | | Change-Id: I1d8061302fbb8494b5ae31e20a644745fe969f10 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Populate includes, defines and pic flags in target interfaces.Stephen Kelly2013-03-275-0/+203
| | | | | | | | | | | | | | | Used by features in CMake 2.8.11. This matches the features in FindQt4 in that version of CMake, namely that the IMPORTED targets contain the appropriate INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS and that the qtmain.lib static library is automatically linked to on Windows by executables. Additionally, the INTERFACE_POSITION_INDEPENDENT_CODE property is set appropriately if Qt requires users to use position independent code. Change-Id: Ide341f43fcaf7d722a7bdf1a12b1071c7e548ccc Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Merge branch 'dev' into stableOswald Buddenhagen2013-03-206-1/+137
|\ | | | | | | | | | | | | | | | | | | | | | | This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
| * Test the OpenGLExtensions cmake module.Stephen Kelly2013-03-143-0/+79
| | | | | | | | | | Change-Id: I3cc71e035fd1c34e05ecb470f897a72a39f42ca4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Generate a Qt5ConfigVersion.cmake file.Stephen Kelly2013-03-131-1/+1
| | | | | | | | | | | | | | | | This allows finding a minimum particular version of Qt 5. Change-Id: I96112f1be90f397ec60a2b233989ac0e0380bef9 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-053-0/+54
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/mac/pbuilder_pbx.cpp src/corelib/kernel/qtimerinfo_unix.cpp src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
| * \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-283-5/+5
| |\ \ | | | | | | | | | | | | Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
| * | | Add an umbrella cmake config file for Qt 5.Stephen Kelly2013-01-244-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I96b6e96539a84a5919992afbaee757fa080b7ae0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Run CMake dbus tests if dbus is expected to be available.Stephen Kelly2013-03-191-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of first finding it and then testing that we can find it. Change-Id: I1a1090693520b1d6adadef93839f25d277947e76 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Make the qtbase cmake tests work without the Widgets module.Stephen Kelly2013-03-182-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-28540 Change-Id: I916d104c8aba551ee9a5b34da3fd85dcb26bbf64 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Make cmake tests not depend on QtWidgets where not needed.Stephen Kelly2013-03-152-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib6347360d678bbe54445ebb0680ad66d77a7f3c7 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Clean up cmake test regarding dependencies.Stephen Kelly2013-03-151-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to list the dependencies of the Widgets module. Change-Id: I9469d4f352685f7122a258f1a44bd017fdc5b3a7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Test that the ConfigVersion.cmake files work.Stephen Kelly2013-03-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Invoking find_package with a version but without the version file present results in an error. Change-Id: I29d662081ad5dbd7b2259abeec06affda97cbb6a Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | | Clean up the CMake dbus module test.Stephen Kelly2013-03-131-5/+3
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | The DBus module is aware of its QtCore dependency, and it doesn't need to be found explicitly. This test probably dates from when that was not the case. Change-Id: I3c78997660efed14d84b062d38d8c68dd4f7ae56 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | Populate the cmake variables only one time.Stephen Kelly2013-02-213-0/+54
| |/ |/| | | | | | | | | | | | | | | | | | | | | Since we're only including the Extras file one time, invoking set() for the include dirs again will overwrite the addition of include dirs in the extras file. We only need to populate these variables if not set anyway, so do that. Change-Id: I04dad0674778e79c8c12c18231b8ce6c92edf881 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Doc: Fix module name formatSze Howe Koh2013-01-253-5/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Generate instances of types in the CMake tests.Stephen Kelly2012-10-314-84/+32
| | | | | | | | | | | | | | | | All modules currently have a test_modules CMake test. The new module_includes test has very similar requirements, and can obsolete the hand-maintained test_modules tests in all modules. After all test_modules have been removed in other repos, the module_includes test can be renamed to that name. The types chosen need to have a constructor which can be invoked with no arguments. QtConcurrent has no public classes which fit that description so it is still tested separately Change-Id: Id7929cd32b3112c293cbf5e6964cc894a697f9b1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add a CMake macro to test module includesStephen Kelly2012-10-261-0/+23
| | | | | | | | | | | | | | | | | 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>
* Add missing test for the Qt5PrintSupport module.Stephen Kelly2012-10-252-0/+4
| | | | | Change-Id: Ic3860cc13fbb37a1d3ae63ad100b7d722a987272 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use the mkspec name Qt was configured with instead of default symlinkStephen Kelly2012-10-161-3/+1
| | | | | | | | | The default symlink is not available on Windows, so the qplatformdefs.h header is not available there. Instead we can bypass the symlink and use the actual mkspec name directly. Change-Id: I1d7e05f35c1ff56befab5bed307cb1755ade8377 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* CMake: Improve QT5_GET_MOC_FLAGS macroStephen Kelly2012-10-044-0/+127
| | | | | | | | | | | | We need to handle CMAKE_INCLUDE_CURRENT_DIR for include directories. Otherwise generated files located in the current binary directory are not found as expected. e.g. *.json file as meta data for Qt5's plugins generated at build time. Change-Id: I14ae1e7013f9d8b485aa990d50db4a03ca4f4b81 Reviewed-by: Yuchen Deng <loaden@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2221-501/+501
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Don't attempt to test DBus on QNX.Stephen Kelly2012-08-281-1/+1
| | | | | | | It is not expected to be there currently. Change-Id: I9e0ece35b8064ecb7cb24e55604ea78c9e6ab242 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Exclude the qplatformdefs CMake test on Windows.Stephen Kelly2012-08-181-1/+3
| | | | | | | | | | The fix for this failing test is not yet agreed to. Disable it to allow progress with the CI system while the fix is decided. Task-number: QTBUG-26869 Change-Id: Ia8089b8e66d750353e7c1c69597916af0d042856 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use POSITION_INDEPENDENT_CODE for these tests.Stephen Kelly2012-08-132-0/+4
| | | | | | | | These projects are expected to fail, but we need to make sure they fail for the right reason. Change-Id: I8a7caaa663060712c5c7113ef3b054feba2e2287 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add hints for where to find packages for projects expected to fail.Stephen Kelly2012-08-132-4/+12
| | | | | | | | In the CI system, an environment variable is used to convey the CMAKE_PREFIX_PATH, but that can not be relied upon. Change-Id: Ie4fbacaac6ae18f95a3b4d1e796a4b4c91a418c4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>