From e3adb90d60c6469d0c798ff45c167c951fcb4543 Mon Sep 17 00:00:00 2001 From: tnixeu <4436784+tnixeu@users.noreply.github.com> Date: Sat, 29 Oct 2022 02:30:47 +0200 Subject: [PATCH] skip unity build for files which fail to compile Signed-off-by: tnixeu <4436784+tnixeu@users.noreply.github.com> --- src/gui/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 5d4f8f479..c698e1a25 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -319,8 +319,10 @@ set(3rdparty_SRC if(NOT WIN32) list(APPEND 3rdparty_SRC ../3rdparty/qtlockedfile/qtlockedfile_unix.cpp) + set_property(SOURCE ../3rdparty/qtlockedfile/qtlockedfile_unix.cpp PROPERTY SKIP_UNITY_BUILD_INCLUSION ON) else() list(APPEND 3rdparty_SRC ../3rdparty/qtlockedfile/qtlockedfile_win.cpp ) + set_property(SOURCE ../3rdparty/qtlockedfile/qtlockedfile_win.cpp PROPERTY SKIP_UNITY_BUILD_INCLUSION ON) endif() find_package(Qt5LinguistTools) @@ -515,6 +517,16 @@ target_link_libraries(nextcloudCore add_subdirectory(socketapi) +# skip unity inclusion for files which cause problems with a CMake unity build +set_property(SOURCE + ${CMAKE_CURRENT_SOURCE_DIR}/socketapi/socketapi.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/socketapi/socketuploadjob.cpp + PROPERTY SKIP_UNITY_BUILD_INCLUSION ON) + +foreach(FILE IN LISTS client_UI_SRCS) + set_property(SOURCE ${FILE} PROPERTY SKIP_UNITY_BUILD_INCLUSION ON) +endforeach() + if(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND) target_link_libraries(nextcloudCore PUBLIC Qt5::WebEngineWidgets) endif() -- 2.30.2