Add some exclusions for CMake Unity (Jumbo) builds

Add exclusions for issues that are likely not fixable
(3rd party code, X11 define clashes, etc) in 3rd party,
tools and plugins.

Pick-to: 6.5
Task-number: QTBUG-109394
Done-with: Amir Masoud Abdol <amir.abdol@qt.io>
Change-Id: I698c004201a76a48389271c130e44fba20f5adf7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Friedemann Kleint 2023-01-27 11:26:22 +01:00
parent 557dcd8a87
commit 64dc6fe87d
18 changed files with 61 additions and 1 deletions

View File

@ -133,6 +133,7 @@ set_target_properties(${target_name} PROPERTIES
AUTOMOC OFF
AUTORCC OFF
AUTOUIC OFF
UNITY_BUILD OFF
)
qt_internal_apply_gc_binaries(${target_name} PRIVATE) # special case

View File

@ -73,6 +73,8 @@ qt_internal_add_3rdparty_library(BundledFreetype
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
set_target_properties(BundledFreetype PROPERTIES UNITY_BUILD OFF)
qt_internal_add_3rdparty_header_module(FreetypePrivate
EXTERNAL_HEADERS_DIR include
)

View File

@ -68,6 +68,8 @@ qt_internal_add_3rdparty_library(BundledHarfbuzz
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/harfbuzz>
)
set_target_properties(BundledHarfbuzz PROPERTIES UNITY_BUILD OFF)
qt_internal_add_sync_header_dependencies(BundledHarfbuzz Core)
# GHS compiler doesn't support the __restrict keyword

View File

@ -60,6 +60,8 @@ qt_internal_add_3rdparty_library(BundledLibjpeg
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
)
set_target_properties(BundledLibjpeg PROPERTIES UNITY_BUILD OFF)
qt_internal_add_3rdparty_header_module(JpegPrivate
EXTERNAL_HEADERS
src/jpeglib.h

View File

@ -34,6 +34,8 @@ qt_internal_add_3rdparty_library(BundledZLIB
$<TARGET_PROPERTY:Core,INCLUDE_DIRECTORIES>
)
set_target_properties(BundledZLIB PROPERTIES UNITY_BUILD OFF)
qt_internal_add_sync_header_dependencies(BundledZLIB Core)
qt_disable_warnings(BundledZLIB)

View File

@ -292,6 +292,13 @@ set(qpdf_resource_files
"painting/qpdfa_metadata.xml"
)
set_source_files_properties(painting/qdrawhelper.cpp # NO_PCH_SOURCES
PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
if(WIN32 OR (UNIX AND NOT APPLE))
set_target_properties(Gui PROPERTIES UNITY_BUILD OFF) # X11 define clashes/Windows oddities.
endif()
qt_internal_add_resource(Gui "qpdf"
PREFIX
"/qpdf/"

View File

@ -48,6 +48,14 @@ qt_internal_add_module(OpenGL
GENERATE_CPP_EXPORTS
)
# qDebug()<< ambiguities
set_source_files_properties(qopengltextureblitter.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
if(APPLE)
set_source_files_properties(qopenglversionfunctionsfactory.cpp
PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
endif()
## Scopes:
#####################################################################

View File

@ -16,3 +16,5 @@ qt_internal_add_plugin(QICOPlugin
Qt::CorePrivate
Qt::Gui
)
set_target_properties(QICOPlugin PROPERTIES UNITY_BUILD OFF)

View File

@ -25,3 +25,5 @@ qt_internal_add_plugin(QEglFSX11IntegrationPlugin
X11::XCB
XCB::XCB
)
set_target_properties(QEglFSX11IntegrationPlugin PROPERTIES UNITY_BUILD OFF) # X11 define clashes

View File

@ -66,6 +66,10 @@ qt_internal_add_plugin(QWindowsIntegrationPlugin
runtimeobject
)
# Duplicated symbols
set_source_files_properties(qwindowspointerhandler.cpp qwindowsmousehandler.cpp
PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
# Resources:
set_source_files_properties("openglblacklists/default.json"
PROPERTIES QT_RESOURCE_ALIAS "default.json"

View File

@ -62,6 +62,8 @@ qt_internal_add_module(XcbQpaPrivate
XKB::XKB
)
set_target_properties(XcbQpaPrivate PROPERTIES UNITY_BUILD OFF) # X11 define clashes
qt_disable_apple_app_extension_api_only(XcbQpaPrivate)
## Scopes:

View File

@ -29,3 +29,5 @@ qt_internal_add_plugin(QXcbEglIntegrationPlugin
Qt::XcbQpaPrivate
EGL::EGL
)
set_target_properties(QXcbEglIntegrationPlugin PROPERTIES UNITY_BUILD OFF) # X11 define clashes

View File

@ -27,6 +27,8 @@ qt_internal_add_plugin(QXcbGlxIntegrationPlugin
Qt::XcbQpaPrivate
)
set_target_properties(QXcbGlxIntegrationPlugin PROPERTIES UNITY_BUILD OFF) # X11 define clashes
## Scopes:
#####################################################################

View File

@ -24,6 +24,10 @@ qt_internal_add_plugin(QTlsBackendOpenSSLPlugin
OPENSSL_API_COMPAT=0x10100000L
)
if (WIN32) # Windows header issues
set_target_properties(QTlsBackendOpenSSLPlugin PROPERTIES UNITY_BUILD OFF)
endif()
qt_internal_extend_target(QTlsBackendOpenSSLPlugin CONDITION QT_FEATURE_dtls
SOURCES
qdtls_openssl.cpp qdtls_openssl_p.h

View File

@ -42,6 +42,10 @@ qt_internal_add_module(PrintSupport
"(^|/)qplatform.+\\.h$"
)
if(WIN32) # Static plugin link errors
set_target_properties(PrintSupport PROPERTIES UNITY_BUILD OFF)
endif()
## Scopes:
#####################################################################
@ -73,6 +77,10 @@ qt_internal_extend_target(PrintSupport CONDITION WIN32
"platform/windows/qwindowsprintersupport.cpp"
)
set_source_files_properties(platform/macos/qcocoaprintersupport.mm # NO_PCH_SOURCES
platform/windows/qwindowsprintersupport.cpp
PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
qt_internal_extend_target(PrintSupport CONDITION QT_FEATURE_printpreviewwidget
SOURCES
kernel/qpaintengine_preview.cpp kernel/qpaintengine_preview_p.h
@ -186,6 +194,9 @@ qt_internal_extend_target(PrintSupport CONDITION QT_FEATURE_printdialog AND UNIX
uic
)
# Clashes with CUPS headers
set_source_files_properties(dialogs/qprintdialog_unix.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
qt_internal_extend_target(PrintSupport CONDITION QT_FEATURE_printpreviewdialog
SOURCES
dialogs/qprintpreviewdialog.cpp dialogs/qprintpreviewdialog.h

View File

@ -38,6 +38,9 @@ qt_internal_add_module(Sql
GENERATE_CPP_EXPORTS
)
set_source_files_properties(compat/removed_api.cpp # NO_PCH_SOURCES
PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
## Scopes:
#####################################################################

View File

@ -226,7 +226,7 @@ qt_internal_extend_target(Bootstrap CONDITION MINGW AND WIN32
target_link_libraries(Bootstrap PRIVATE PlatformCommonInternal)
qt_internal_apply_gc_binaries(Bootstrap PUBLIC)
set_target_properties(Bootstrap PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
set_target_properties(Bootstrap PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF UNITY_BUILD OFF)
qt_internal_add_target_aliases(Bootstrap)
qt_set_msvc_cplusplus_options(Bootstrap PUBLIC)
qt_set_common_target_properties(Bootstrap)

View File

@ -21,3 +21,7 @@ qt_internal_add_tool(${target_name}
tracegen.cpp
)
qt_internal_return_unless_building_tools()
set_target_properties(${target_name} PROPERTIES
UNITY_BUILD OFF
)