Commit Graph

25 Commits

Author SHA1 Message Date
Stephen Kelly
aae0a2144d Always use forward slashes in paths passed to cmake.
Otherwise it issues many warnings.

Change-Id: I072afc65eed3f2549e5e5894f8d290c792025e4c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-07-10 13:05:01 +02:00
Stephen Kelly
efb592503a Add a unit test for testing Qt in its install location.
The Qt CI system runs the unit tests after installation, but
with the qmake in the build directory. This means that the
installed content is not unit tested. Add an additional cmake
unit test to test the files in the install location.

The new test is marked insignificant for now until the true
effect on the CI system is known.

Task-number: QTBUG-27315

Change-Id: If9f12e88cfc741946cfabc25dbf789a11a2af4b8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-07-02 23:08:54 +02:00
Stephen Kelly
3483336889 Only expect EGL libraries in the cmake files if Qt is configured to use it.
Change-Id: Ida382a80dba882bbeb920756adc0c16321efe37e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-07 22:43:14 +02:00
Stephen Kelly
bc4fbcd215 Add IMPORTED targets for the GL libraries used by Qt.
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>
2013-04-22 18:35:52 +02:00
Stephen Kelly
0084272c5c Don't use the CMake MinGW if cross-compiling.
This way, the default generator is used when cross compiling
for mingw.

Change-Id: Ie536f1bca35ea38aec1232cdd95fc063c4f23e70
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
2013-04-16 19:45:11 +02:00
Stephen Kelly
aeaab5210f Generate Win64 code when testing 64bit Qt on Windows.
This should fix the issue reported here:

 http://thread.gmane.org/gmane.comp.lib.qt.devel/10746

From:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6590/focus=6593

Change-Id: I523de5c1a89f08bd832a684fcff7c57565ebc5c9
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-10 21:11:15 +02:00
Stephen Kelly
f29b793508 Use CMake facility for verbose makefiles instead of an env var.
It should also have an effect for Visual Studio project files, not
just makefile generators.

Change-Id: I395071f09b29a6e8967a3d44e41d30480ae783f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-10 17:51:51 +02:00
Stephen Kelly
30d01db3a5 Test that the CMake files create appropriate version variables.
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>
2013-04-05 14:20:39 +02:00
Stephen Kelly
7fb3c6bf3d Fix the CMake tests with CMake release candidates.
The version number parsing needs to handle the reported version string.

Change-Id: Ifd34b2c86b21a1c5e4c91a43447468ca6feab8cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-26 13:07:08 +01:00
Stephen Kelly
be431cc50a Get more information from failing cmake tests.
Enable verbose makefile output which will appear in failure logs.

Change-Id: I005069c122f46887f6095034d9cf1a3d2fdbc750
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-26 10:18:02 +01:00
Stephen Kelly
bc1fb206bb Run CMake dbus tests if dbus is expected to be available.
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>
2013-03-19 11:26:41 +01:00
Stephen Kelly
4111a676f1 Make the qtbase cmake tests work without the Widgets module.
Task-number: QTBUG-28540

Change-Id: I916d104c8aba551ee9a5b34da3fd85dcb26bbf64
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-18 20:17:10 +01:00
Stephen Kelly
67de2905b0 Join the CMAKE_PREFIX_PATH components into a cmake list before use.
Change-Id: I16e05b72e57473239b89498313ba7745ffa6a346
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-03-15 10:04:15 +01:00
Stephen Kelly
97e755945c Automatically find external dependencies in cmake tests.
Currently the Qt5_MODULE_TEST_DEPENDS variable is maintained individually
in each repo. This patch makes that obsolete.

Change-Id: I1a72bb4da70b9ace6f79296d6a3fb295eaa999ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-25 23:33:16 +01:00
Jonathan Liu
724cb5d30f Support MinGW for CTest test cases
Change-Id: I581701f0b830292a21bc805da0398cbc96f82918
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-09 23:51:48 +01:00
Oswald Buddenhagen
586adeabe4 add and use qtHaveModule() function
this is much more elegant than the so far propagated !isEmpty(QT.foo.name).
also replace feature-specific tests (no-gui and no-widgets) and the
obsolete contains(QT_CONFIG, foo) syntax.

Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-21 19:05:02 +01:00
Sergio Ahumada
b17e030ef5 test: Mark cmake tests as insignificant when -no-widgets is used
Task-number: QTBUG-28540
Change-Id: Iaa238ce8fb857ec8856dd9d6f3adc49795db1de1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-12-11 22:03:00 +01:00
Stephen Kelly
ff70c020bc Make CMake tests significant on Windows.
All bugs in the testing scripts are now fixed.

Task-number: QTBUG-27087
Change-Id: I764257a9bbee7efeb9265449f6fa6a15bdeba883
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-09-27 15:46:18 +02:00
Jan Arve Saether
44a0e972a0 When trying to run cmake, don't show stderr output.
It looks like the qmake process failed if cmake is not installed.

Change-Id: I721796a602d8c572144e9d21be5d62b737698b73
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-09-24 18:01:14 +02:00
Rohan McGovern
6db03bbc63 Add a task number to ctest_testcase insignification
Make sure it doesn't get lost.

Task-number: QTBUG-27087
Change-Id: I8b773cfa4b1b9ab5430096c2cff50911e84b73f7
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Toby Tomkins <tjtomkins@gmail.com>
2012-09-01 17:30:31 +02:00
Rohan McGovern
42457c2f5f Temporarily mark ctest testcases as insignificant on Windows
The deployment of cmake onto Windows test machines caused test failures
with no changes to the code under test.  Mark all the ctest tests as
insignificant until the failures can be fixed.

Change-Id: If0cd4001ae6ec49fd38b9e0f97dd5326fddae433
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-30 05:45:55 +02:00
Stephen Kelly
acf9220374 Use qmake dirname function correctly.
It takes a variable name apparently.

Change-Id: I9e2e2a0f6f5c42ecf9d07e4ac45954f14676d559
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-07-03 14:54:52 +02:00
Stephen Kelly
7327ae8c17 Look for CMake config files in the same prefixes as mkspecs.
This will allow tests of modules outside of qtbase to find their
CMake config files.

Change-Id: I68036908d0fd2ec640530b57d0f572d211ef44f0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-03 01:08:18 +02:00
Stephen Kelly
a8ec5e912f Simplify logic for paths to CMake modules in tests.
Use a command line argument instead of an environment variable.

Change-Id: I518b21d1fb9567d182384885a308c76e108598d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-03 01:08:13 +02:00
Stephen Kelly
c42a0a7729 Factorize the cmake test infrastructure to be reusable.
This makes it easy to add cmake module tests for all modules.

Change-Id: I303bf7674ca6ae7a8544488f96e8e02afbaa6ff0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-06-26 11:49:52 +02:00