From e0cec08480ab6a453e62b76666d5e24bef4f2ab0 Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Mon, 24 Apr 2023 14:15:31 +0200 Subject: [PATCH] Exclude files from unity build If not excluded, some of the macros in X11.h and Xlib.h conflicts with symbols defined in `UrlFormattingOption` and `Type` in `qurl.h` and `qjsonvalue.h`. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ic1b056f0bcd6643394401bca464f751b3489202d Reviewed-by: Joerg Bornemann --- src/corelib/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index a1cb450627a..84423f400fb 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -550,6 +550,14 @@ qt_internal_extend_target(Core CONDITION WIN32 tools/qhash.cpp # Q_DECL_INIT_PRIORITY ) +qt_internal_extend_target(Core CONDITION LINUX + NO_UNITY_BUILD_SOURCES + # Some of the macros in X11.h and Xlib.h are colliding with + # symbols defined in some of the enums, e.g., None. + io/qurl.h + serialization/qjsonvalue.h +) + if(NOT WIN32) ### Qt7: remove # Make qwineventnotifier.h available on non-Windows platforms too for code bases that include