Commit ff469fb3 authored by Laurent Montel's avatar Laurent Montel 😁

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 30260452
Pipeline #44083 passed with stage
in 16 minutes and 4 seconds
......@@ -65,6 +65,16 @@ find_package(KF5GrantleeTheme ${GRANTLEETHEME_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Purpose ${KF5_MIN_VERSION} CONFIG REQUIRED)
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()
option(BUILD_DESIGNERPLUGIN "Build plugin for Qt Designer" ON)
add_feature_info(DESIGNERPLUGIN ${BUILD_DESIGNERPLUGIN} "Build plugin for Qt Designer")
......
......@@ -165,6 +165,9 @@ kconfig_add_kcfg_files(libpimcommon_SRCS
)
add_library(KF5PimCommon ${libpimcommon_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(KF5PimCommon PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5PimCommon BASE_NAME pimcommon)
add_library(KF5::PimCommon ALIAS KF5PimCommon)
......
......@@ -140,6 +140,10 @@ ecm_qt_declare_logging_category(libpimcommonakonadi_SRCS HEADER pimcommonakonadi
add_library(KF5PimCommonAkonadi ${libpimcommonakonadi_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(KF5PimCommonAkonadi PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5PimCommonAkonadi BASE_NAME pimcommonakonadi)
add_library(KF5::PimCommonAkonadi ALIAS KF5PimCommonAkonadi)
......
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