summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-01-27 11:26:22 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-02-16 16:03:06 +0100
commit64dc6fe87d05aaad3ce516747ad6dbd048f388cb (patch)
treeb92970ae773c3553b8e3dcb6f8470689f909e75a /src
parent557dcd8a87c6c6c77ccc71a85b1ec349c69eb4c4 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/freetype/CMakeLists.txt2
-rw-r--r--src/3rdparty/harfbuzz-ng/CMakeLists.txt2
-rw-r--r--src/3rdparty/libjpeg/CMakeLists.txt2
-rw-r--r--src/3rdparty/zlib/CMakeLists.txt2
-rw-r--r--src/gui/CMakeLists.txt7
-rw-r--r--src/opengl/CMakeLists.txt8
-rw-r--r--src/plugins/imageformats/ico/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/windows/CMakeLists.txt4
-rw-r--r--src/plugins/platforms/xcb/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt2
-rw-r--r--src/plugins/tls/openssl/CMakeLists.txt4
-rw-r--r--src/printsupport/CMakeLists.txt11
-rw-r--r--src/sql/CMakeLists.txt3
-rw-r--r--src/tools/bootstrap/CMakeLists.txt2
-rw-r--r--src/tools/tracegen/CMakeLists.txt4
17 files changed, 60 insertions, 1 deletions
diff --git a/src/3rdparty/freetype/CMakeLists.txt b/src/3rdparty/freetype/CMakeLists.txt
index 720a98bee1..ac7fb8480b 100644
--- a/src/3rdparty/freetype/CMakeLists.txt
+++ b/src/3rdparty/freetype/CMakeLists.txt
@@ -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
)
diff --git a/src/3rdparty/harfbuzz-ng/CMakeLists.txt b/src/3rdparty/harfbuzz-ng/CMakeLists.txt
index 83566064b3..b18179e6d0 100644
--- a/src/3rdparty/harfbuzz-ng/CMakeLists.txt
+++ b/src/3rdparty/harfbuzz-ng/CMakeLists.txt
@@ -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
diff --git a/src/3rdparty/libjpeg/CMakeLists.txt b/src/3rdparty/libjpeg/CMakeLists.txt
index d1da6c6849..13e54119be 100644
--- a/src/3rdparty/libjpeg/CMakeLists.txt
+++ b/src/3rdparty/libjpeg/CMakeLists.txt
@@ -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
diff --git a/src/3rdparty/zlib/CMakeLists.txt b/src/3rdparty/zlib/CMakeLists.txt
index ee9ece80fc..81fc649538 100644
--- a/src/3rdparty/zlib/CMakeLists.txt
+++ b/src/3rdparty/zlib/CMakeLists.txt
@@ -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)
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 96a1ae4bd5..edfb908896 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -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/"
diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt
index 3f3a0d43b8..1729f1b12d 100644
--- a/src/opengl/CMakeLists.txt
+++ b/src/opengl/CMakeLists.txt
@@ -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:
#####################################################################
diff --git a/src/plugins/imageformats/ico/CMakeLists.txt b/src/plugins/imageformats/ico/CMakeLists.txt
index d590489307..6417c1d9d4 100644
--- a/src/plugins/imageformats/ico/CMakeLists.txt
+++ b/src/plugins/imageformats/ico/CMakeLists.txt
@@ -16,3 +16,5 @@ qt_internal_add_plugin(QICOPlugin
Qt::CorePrivate
Qt::Gui
)
+
+set_target_properties(QICOPlugin PROPERTIES UNITY_BUILD OFF)
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt
index 21699aab27..5e91d67ccd 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt
@@ -25,3 +25,5 @@ qt_internal_add_plugin(QEglFSX11IntegrationPlugin
X11::XCB
XCB::XCB
)
+
+set_target_properties(QEglFSX11IntegrationPlugin PROPERTIES UNITY_BUILD OFF) # X11 define clashes
diff --git a/src/plugins/platforms/windows/CMakeLists.txt b/src/plugins/platforms/windows/CMakeLists.txt
index 33ccbf6a0a..4425e78b30 100644
--- a/src/plugins/platforms/windows/CMakeLists.txt
+++ b/src/plugins/platforms/windows/CMakeLists.txt
@@ -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"
diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt
index 3303f19487..4f019dde5a 100644
--- a/src/plugins/platforms/xcb/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/CMakeLists.txt
@@ -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:
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt
index c67ccd1cb1..98ea3c9e43 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt
@@ -29,3 +29,5 @@ qt_internal_add_plugin(QXcbEglIntegrationPlugin
Qt::XcbQpaPrivate
EGL::EGL
)
+
+set_target_properties(QXcbEglIntegrationPlugin PROPERTIES UNITY_BUILD OFF) # X11 define clashes
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
index 13787eb9e7..a7fdbe0b98 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
@@ -27,6 +27,8 @@ qt_internal_add_plugin(QXcbGlxIntegrationPlugin
Qt::XcbQpaPrivate
)
+set_target_properties(QXcbGlxIntegrationPlugin PROPERTIES UNITY_BUILD OFF) # X11 define clashes
+
## Scopes:
#####################################################################
diff --git a/src/plugins/tls/openssl/CMakeLists.txt b/src/plugins/tls/openssl/CMakeLists.txt
index de712666da..0e0a7a1552 100644
--- a/src/plugins/tls/openssl/CMakeLists.txt
+++ b/src/plugins/tls/openssl/CMakeLists.txt
@@ -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
diff --git a/src/printsupport/CMakeLists.txt b/src/printsupport/CMakeLists.txt
index 83ab9cddeb..330f44c689 100644
--- a/src/printsupport/CMakeLists.txt
+++ b/src/printsupport/CMakeLists.txt
@@ -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
diff --git a/src/sql/CMakeLists.txt b/src/sql/CMakeLists.txt
index a7e139655a..e69df530a9 100644
--- a/src/sql/CMakeLists.txt
+++ b/src/sql/CMakeLists.txt
@@ -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:
#####################################################################
diff --git a/src/tools/bootstrap/CMakeLists.txt b/src/tools/bootstrap/CMakeLists.txt
index 232b6fcdfe..0919159b59 100644
--- a/src/tools/bootstrap/CMakeLists.txt
+++ b/src/tools/bootstrap/CMakeLists.txt
@@ -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)
diff --git a/src/tools/tracegen/CMakeLists.txt b/src/tools/tracegen/CMakeLists.txt
index 2bcdfe42b0..42b0cbcf77 100644
--- a/src/tools/tracegen/CMakeLists.txt
+++ b/src/tools/tracegen/CMakeLists.txt
@@ -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
+)