CMake: Fix excessive size of precompiled header files
Do not add catch-all header files like QtCore, QtGui, etc. to precompiled headers for targets that already define their own set of precompiled header files. This reduces the size of the precompiled headers and brings the pch file sizes down into the region of the qmake build. Pick-to: 6.2 Task-number: QTBUG-89122 Change-Id: I8e4d17aa6829c7d7b1aa01a01a61b6677e22c460 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>bb10
parent
bae9aeacbe
commit
278368b523
|
|
@ -38,9 +38,9 @@ function(qt_internal_extend_target target)
|
|||
set(is_library TRUE)
|
||||
endif()
|
||||
foreach(lib ${arg_PUBLIC_LIBRARIES} ${arg_LIBRARIES})
|
||||
# Automatically generate PCH for 'target' using dependencies
|
||||
# if 'target' is a library/module!
|
||||
if (${is_library})
|
||||
# Automatically generate PCH for 'target' using public dependencies.
|
||||
# But only if 'target' is a library/module that does not specify its own PCH file.
|
||||
if(NOT arg_PRECOMPILED_HEADER AND ${is_library})
|
||||
qt_update_precompiled_header_with_library("${target}" "${lib}")
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue