Commit ec08b154 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 9e1ce4e2
Pipeline #44157 passed with stage
in 7 minutes and 31 seconds
......@@ -93,6 +93,17 @@ add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054C00)
add_definitions(-DQT_NO_FOREACH)
add_definitions(-DQT_NO_KEYWORDS)
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()
add_subdirectory(src)
......
......@@ -11,6 +11,9 @@ ecm_qt_declare_logging_category(kontactinterface_LIB_SRCS HEADER kontactinterfac
DESCRIPTION "kontactinterface (pim lib)" EXPORT KONTACTINTERFACE)
add_library(KF5KontactInterface ${kontactinterface_LIB_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(KF5KontactInterface PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5KontactInterface BASE_NAME kontactinterface)
......
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