From c86ea25b60ae2d0d2272b9525e85fbc5884f57de Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 20 Feb 2023 08:27:55 +0100 Subject: [PATCH] QtCore: Add more exclusions for Unity builds Removed `_DEFAULT_SOURCE` as it was not consistent, and possible didn't work in the first place, and was masked by the exclusion of `io/qfilesystemengine_unix.cpp`. Amends fc3a9ee60159b2391cba2320cfdeeddb94d781f8. Task-number: QTBUG-109394 Change-Id: I8036e66d29d5ec88608d284436b4e8719144f06d Reviewed-by: Thiago Macieira (cherry picked from commit 3c1bea178c3e23719dd98d931c056e34a680ff3c) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 9f80f4cfcaa..b10aec0d2de 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -624,11 +624,10 @@ qt_internal_extend_target(Core CONDITION UNIX thread/qthread_unix.cpp ) -# Necessary for defining DT_* macros, otherwise they cause -# error during UNITY_BUILD. qt_internal_extend_target(Core CONDITION APPLE - DEFINES - _DEFAULT_SOURCE + NO_UNITY_BUILD_SOURCES + io/qfilesystemengine_unix.cpp # avoid undefined DT_* macros + io/qlockfile_unix.cpp # avoid undefined SOCK_MAXADDRLEN (in proc_info.h) ) qt_internal_extend_target(Core CONDITION QT_FEATURE_thread @@ -1276,6 +1275,8 @@ set_source_files_properties(serialization/qcborstreamwriter.cpp # CBOR macro cla io/forkfd_qt.cpp # EINTR_LOOP macro clashes global/qglobal.cpp # undef qFatal global/qlogging.cpp # undef qFatal + text/qstringconverter.cpp # enum Data + tools/qcryptographichash.cpp # KeccakNISTInterface/Final ${corelib_no_pch_sources} # NO_PCH_SOURCES PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)