Commit b1cc186a 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)
parent 68cdd78d
Pipeline #44116 passed with stage
in 14 minutes and 23 seconds
......@@ -86,6 +86,17 @@ configure_file(config-enterprise.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config-
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054E00)
option(USE_UNIFY_CMAKE_SUPPORT "Use UNIFY cmake support (speedup compile time)" FALSE)
set(COMPILE_WITH_CMAKE_SUPPORT false)
if (USE_UNIFY_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_CMAKE_SUPPORT true)
endif()
endif()
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5IncidenceEditor")
......
......@@ -96,6 +96,9 @@ ki18n_wrap_ui(incidenceeditors_ng_desktop_LIB_SRCS
)
add_library(KF5IncidenceEditor ${incidenceeditors_ng_desktop_LIB_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(KF5IncidenceEditor PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5IncidenceEditor BASE_NAME incidenceeditor)
add_library(KF5::IncidenceEditor ALIAS KF5IncidenceEditor)
......
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