Commit 1c6e384a 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 5512a39e
Pipeline #44291 passed with stage
in 11 minutes and 23 seconds
......@@ -70,6 +70,17 @@ add_definitions(-DQT_NO_KEYWORDS)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
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(src)
add_subdirectory(serializers)
if (BUILD_TESTING)
......
......@@ -44,7 +44,9 @@ ki18n_wrap_ui(akonadicalendar_LIB_SRC publishdialog_base.ui)
qt5_add_dbus_adaptor( akonadicalendar_LIB_SRC interfaces/org.freedesktop.Akonadi.Resource.FreeBusyProvider.xml freebusyproviderbase_p.h Akonadi::FreeBusyProviderBasePrivate freebusyprovideradaptor Akonadi__FreeBusyProviderAdaptor )
add_library(KF5AkonadiCalendar ${akonadicalendar_LIB_SRC})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KF5AkonadiCalendar PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5AkonadiCalendar BASE_NAME akonadi-calendar)
add_library(KF5::AkonadiCalendar ALIAS KF5AkonadiCalendar)
......
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