Commit 852e241f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to use UNITY build see...

Allow to use UNITY build see https://cmake.org/cmake/help/latest/prop_tgt/UNITY_BUILD.html (Reduce compile time. Need cmake 3.16.0) (disable for the moment)
parent 64cfa63c
Pipeline #44292 passed with stage
in 15 minutes and 19 seconds
......@@ -94,6 +94,20 @@ add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054E00)
if (TARGET KUserFeedbackWidgets)
add_definitions(-DWITH_KUSERFEEDBACK)
endif()
#Laurent: reactivate it
#option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" FALSE)
#set(COMPILE_WITH_UNITY_CMAKE_SUPPORT false)
#if (USE_UNITY_CMAKE_SUPPORT)
# if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
# message(STATUS "CMAKE version is less than 3.16.0 . We can't use cmake unify build support")
# else()
# set(COMPILE_WITH_UNITY_CMAKE_SUPPORT true)
# endif()
#endif()
add_subdirectory(export)
add_subdirectory(interfaces)
add_subdirectory(plugins)
......
......@@ -112,6 +112,9 @@ set(akregatorprivate_LIB_SRCS
qt5_add_resources(akregatorprivate_LIB_SRCS akregator.qrc)
add_library(akregatorprivate ${akregatorprivate_LIB_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akregatorprivate PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(akregatorprivate BASE_NAME akregator)
set(akregator_userfeedback_LIB)
......@@ -229,6 +232,9 @@ target_link_libraries(akregatorpart
KF5::WebEngineViewer
KF5::KIOGui
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akregatorpart PROPERTIES UNITY_BUILD ON)
endif()
install(TARGETS akregatorpart DESTINATION ${KDE_INSTALL_PLUGINDIR})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment