Disable precompiled headers for small modules
Creating a precompiled header exclusively for a one- or two-file module is wasteful. The time that it takes to build the precompiled source is on the same order as a regular compilation, so enabling precompiled headers for those modules just makes the build slower. Also make it possible to override the precompiled header by just setting PRECOMPILED_HEADER to empty. Change-Id: I0e1a09998253489388abfffd14b5f221288c4826 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>bb10
parent
255d291efd
commit
47c9b66a8b
|
|
@ -157,12 +157,18 @@ MODULE_MASTER_DEPS_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$${MOD
|
|||
}
|
||||
SYNCQT.HEADER_FILES += $$MODULE_MASTER_DEPS_HEADER
|
||||
|
||||
# Automatically enable precompiled headers for Qt modules,
|
||||
# except for Gcc/Windows: Larger precompiled headers crash cc1plus.exe
|
||||
# (e.g. with i686-4.8.2-release-posix-dwarf-rt_v3-rev3)
|
||||
!if(gcc:equals(QMAKE_HOST.os, Windows)):!equals(TEMPLATE, aux) {
|
||||
isEmpty(PRECOMPILED_HEADER): PRECOMPILED_HEADER = $$MODULE_MASTER_DEPS_HEADER
|
||||
# Automatically enable precompiled headers for Qt modules with more than 2 sources
|
||||
combined_SOURCES = $$SOURCES $$OBJECTIVE_SOURCES
|
||||
count(combined_SOURCES, 2, >) {
|
||||
# except for Gcc/Windows: Larger precompiled headers crash cc1plus.exe
|
||||
# (e.g. with i686-4.8.2-release-posix-dwarf-rt_v3-rev3)
|
||||
!if(gcc:equals(QMAKE_HOST.os, Windows)):!equals(TEMPLATE, aux) {
|
||||
!defined(PRECOMPILED_HEADER, "var"): PRECOMPILED_HEADER = $$MODULE_MASTER_DEPS_HEADER
|
||||
}
|
||||
} else {
|
||||
CONFIG -= precompile_header
|
||||
}
|
||||
unset(combined_SOURCES)
|
||||
|
||||
headersclean:!internal_module {
|
||||
# Make sure that the header compiles with our strict options
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ QT = core-private gui-private
|
|||
CONFIG += static internal_module
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h
|
||||
|
||||
HEADERS += \
|
||||
qaccessiblebridgeutils_p.h
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ QT = core-private gui
|
|||
CONFIG += static internal_module
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h
|
||||
|
||||
HEADERS += \
|
||||
cglconvenience_p.h
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ QT = core-private gui
|
|||
CONFIG += static internal_module
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h
|
||||
|
||||
HEADERS += qmacmime_p.h
|
||||
SOURCES += qmacmime.mm
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ QT_FOR_CONFIG += gui-private
|
|||
CONFIG += static internal_module
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h
|
||||
|
||||
HEADERS += qdevicediscovery_p.h
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ QT = core-private gui-private
|
|||
CONFIG += static internal_module
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h
|
||||
|
||||
LIBS_PRIVATE += $$QMAKE_LIBS_X11
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ QT = core-private gui-private
|
|||
CONFIG += static internal_module
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h
|
||||
|
||||
HEADERS += $$PWD/qrasterbackingstore_p.h
|
||||
SOURCES += $$PWD/qrasterbackingstore.cpp
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ QT = core-private gui-private
|
|||
CONFIG += static internal_module
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h
|
||||
|
||||
HEADERS +=
|
||||
qkmsdevice_p.h
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ QT = core-private gui-private
|
|||
CONFIG += static internal_module
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h
|
||||
|
||||
SOURCES += \
|
||||
qopenglcompositor.cpp \
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ QT = core-private gui-private
|
|||
CONFIG += static internal_module
|
||||
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII
|
||||
PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h
|
||||
|
||||
unix:!darwin: \
|
||||
include($$PWD/genericunix/genericunix.pri)
|
||||
|
|
|
|||
Loading…
Reference in New Issue