Skip to content

Commit

Permalink
skip unity build for files which fail to compile
Browse files Browse the repository at this point in the history
Signed-off-by: tnixeu <4436784+tnixeu@users.noreply.github.com>
  • Loading branch information
tnixeu committed Oct 29, 2022
1 parent dd3f74d commit 40c607a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 40c607a

Please sign in to comment.