Commit ec6034e0 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 91719f6c
Pipeline #44152 passed with stage
in 10 minutes and 13 seconds
......@@ -47,7 +47,16 @@ add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054E00)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
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()
########### Targets ###########
add_subdirectory(src)
......
......@@ -15,6 +15,9 @@ ecm_qt_declare_logging_category(akonadi_serializer_kalarm_SRCS
add_library(akonadi_serializer_kalarm MODULE ${akonadi_serializer_kalarm_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(akonadi_serializer_kalarm PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(akonadi_serializer_kalarm
KF5::AlarmCalendar
KF5::CalendarCore
......
......@@ -24,6 +24,9 @@ ecm_qt_declare_logging_category(kalarmcal_LIB_SRCS HEADER kalarmcal_debug.h IDEN
add_library(KF5AlarmCalendar ${kalarmcal_LIB_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(KF5AlarmCalendar PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5AlarmCalendar BASE_NAME kalarmcal)
......
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