Commit b2deae2e 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) (disable for the moment)
parent 0190614e
Pipeline #44265 passed with stage
in 13 minutes and 50 seconds
......@@ -62,6 +62,17 @@ endif()
add_definitions(-DQT_NO_FOREACH)
add_definitions(-DQT_NO_KEYWORDS)
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)
ecm_qt_install_logging_categories(
......
......@@ -75,7 +75,9 @@ add_library(KF5MailImporter
${libmailimporter_SRCS}
${libmailimporter_filters_SRCS}
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KF5MailImporter PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header( KF5MailImporter BASE_NAME mailimporter)
add_library(KF5::MailImporter ALIAS KF5MailImporter)
......
......@@ -41,6 +41,9 @@ ecm_qt_declare_logging_category(libmailimporterakonadi_SRCS HEADER mailimportera
add_library(KF5MailImporterAkonadi
${libmailimporterakonadi_SRCS}
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KF5MailImporterAkonadi PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header( KF5MailImporterAkonadi BASE_NAME mailimporterakonadi)
......
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