summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorMÃ¥rten Nordheim <marten.nordheim@qt.io>2019-07-05 10:47:26 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-09-11 08:25:54 +0000
commit2cf0ba1fba9293b3265a186527dbc90d395dfd20 (patch)
tree4a25d77ccd7e201e01bfcbcf086370869c53cce4 /src/gui
parent7df0868ad59dd071f2ce2dd355488128fa56f645 (diff)
Use pre-compiled headers when building Qt with cmake
Some modules define their own manually-maintained lists, and we can rely on the headers generated by each module to include in the pch as well e.g. QtCore/QtCore. There's also e.g. QtWidgetDepends for QtWidgets, but this only works for modules, not for tools, examples or other applications. For now we'll use the Qt<Module>/Qt<Module> headers for the modules we depend on. Building with PCH can be disabled with -DBUILD_WITH_PCH=NO, and it only works for versions of CMake newer than 3.15.20190829. Change-Id: Iae52bd69acfdfd58f4cd20d3cfa3c7f42775f732 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index b5297cad62..1702f0f9d3 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -264,6 +264,10 @@ add_qt_module(Gui
ZLIB::ZLIB
PUBLIC_LIBRARIES
Qt::Core
+ NO_PCH_SOURCES
+ "painting/qdrawhelper.cpp"
+ PRECOMPILED_HEADER
+ "kernel/qt_gui_pch.h"
)
# Resources: