Commit Graph

13 Commits

Author SHA1 Message Date
Tobias Hunger
6a1ee4de07 CMake: Store Qt features in CMake Cache
This is less self-contained than what we have, but significantly speeds
up cmake configure/generate runs.

This patch also warns when a feature is already defined.

Change-Id: I8cab63e208ba98756b47d362a39b462f5ec55e20
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-17 16:16:55 +00:00
Tobias Hunger
3ec578020c CMake: QtFeature optimization
Remove some unnecessary sorting, speeding up cmake by about 10s on my machine

Change-Id: Ieafbd16f6dd8cfe6d1af3c739bfe58e8bf724441
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-17 08:34:02 +00:00
Tobias Hunger
235769d56b CMake: Error out on mis-use of qt_pull_features_into_current_scope
Make it a bit harder to mis-use qt_pull_features_into_current_scope.

Change-Id: I2a6be28d7c0e6207217cb1908ec22cc757acd01a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-17 08:33:50 +00:00
Tobias Hunger
4f26758978 CMake: Introduce Qt::GlobalConfig to hold the global features
This simplifies the handling of features a bit as it removes the special
code to store two sets of features in Qt::Core.

Change-Id: I536d41cfc76a02af054e3cfbad6bda50b1e9e49a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-17 08:33:27 +00:00
Tobias Hunger
b705021b4e CMake: Check for visibility once
Change-Id: I5c729f4509eed16409df5eb048afb7f60c5ca57c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-16 11:07:23 +00:00
Tobias Hunger
ff693d664b CMake: Remove one unnecessary feature push into parent scope
During qt_feature_begin_module no features are changed, so there is
no need to push features.

Change-Id: Id7ebcfad373caa284e790b7eb0a178eaa72216e5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-01-14 12:27:44 +00:00
Tobias Hunger
07dfa3013c CMake: Get rid of useless underscores in QtFeature.cmake
Change-Id: I87eb55ed2ce01ab136dac3e2a587b43bd3f8a98e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-14 14:00:32 +00:00
Tobias Hunger
fac800ad1c CMake: Fix cmake test for features
Features are now always defined (to OFF) when they are not emitted.

Adapt the test for that.

Change-Id: Id5f662f07fea15c22027b9b00d1b53a288b4a0dc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-22 08:39:15 +00:00
Tobias Hunger
b7b4af575f CMake: Simplify Feature handling
Simplify the scope handling of features by providing a function that
just pushes all QT_FEATURES into the parent scope. Use it.

Change-Id: Ic6552fe495394d73fcec6becf6852745ec2d6d59
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 15:01:58 +00:00
Tobias Hunger
3b74e0cc0b QtFeature: (Re-)evaluate QT_FEATURES based on cached values
(Re-)evaluate QT_FEATURE_* based on the corresponding cache values
named FEATURE_*.

Change-Id: I57e76af90221937e45979a6d0c366923983ca7d5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:55:04 +00:00
Tobias Hunger
86098596ca QtFeature: Prefix temporary values with _
This gets makes it easier to see the QT_FEATURE_foo variables;-)

Change-Id: Ide9354d90eecdb15d6d5cec7c2bfb9cee348fb29
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:54:56 +00:00
Tobias Hunger
ec510d0ebc Store QT_FEATUREs that are not emitted
Store QT_FEATUREs that are not emitted, but do not show them in the UI. Also separate
out the UI (FEATURE_foo) from the internal CMake value (QT_FEATURE_foo). This does
break the overriding of settings, but that did not work well before either. This
will be fixed in follow-up patches.

Remove fallout: xkbcommon_system was now evaluated where it was not before. Remove
it as that is always the case now.

Change-Id: I2d303827a1cc9afeef93ad73285a2043ddaa9766
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 14:54:48 +00:00
Simon Hausmann
e9c45bbddd Begin port of qtbase to CMake
Done-by: Alexandru Croitor <alexandru.croitor@qt.io>
Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-by: Kevin Funk <kevin.funk@kdab.com>
Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Done-by: Simon Hausmann <simon.hausmann@qt.io>
Done-by: Tobias Hunger <tobias.hunger@qt.io>
Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-by: Volker Krause <volker.krause@kdab.com>
Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
2018-11-01 11:48:46 +00:00