Commit 28784ff5 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 99ba0e36
Pipeline #44277 passed with stage
in 12 minutes and 45 seconds
......@@ -96,6 +96,16 @@ 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)
......
......@@ -62,7 +62,9 @@ add_executable(akonadiimportwizard
${importwizard_manual_SRCS}
${importwizard_autodetect_SRCS}
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akonadiimportwizard PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(akonadiimportwizard
KPimImportWizard
KF5::AkonadiCore
......
......@@ -58,7 +58,9 @@ ecm_qt_declare_logging_category(libimportwizard_abstract_SRCS HEADER libimportwi
add_library(KPimImportWizard ${libimportwizard_abstract_SRCS} ${libimportwizard_utils_SRCS} ${libimportwizard_wallet_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KPimImportWizard PROPERTIES UNITY_BUILD ON)
endif()
add_library(KPim::ImportWizard ALIAS KPimImportWizard)
......
......@@ -13,6 +13,9 @@ ecm_qt_declare_logging_category(balsaimporter_SRCS HEADER balsaplugin_debug.h
kcoreaddons_add_plugin(balsaimporterplugin JSON balsaimporter.json SOURCES
${balsaimporter_SRCS} INSTALL_NAMESPACE importwizard)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(balsaimporterplugin PROPERTIES UNITY_BUILD ON)
endif()
set_target_properties(balsaimporterplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/importwizard/")
target_link_libraries(balsaimporterplugin
......
......@@ -25,6 +25,9 @@ ecm_qt_declare_logging_category(clawsmailimporter_SRCS HEADER clawsmailplugin_de
kcoreaddons_add_plugin(clawsmailimporterplugin JSON clawsmailimporter.json SOURCES
${clawsmailimporter_SRCS} INSTALL_NAMESPACE importwizard)
set_target_properties(clawsmailimporterplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/importwizard/")
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(clawsmailimporterplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(clawsmailimporterplugin
KPim::ImportWizard
......
......@@ -14,6 +14,10 @@ ecm_qt_declare_logging_category(evolutionv3importer_SRCS HEADER evolutionv3plugi
kcoreaddons_add_plugin(evolutionv3importerplugin JSON evolutionv3importer.json SOURCES
${evolutionv3importer_SRCS} INSTALL_NAMESPACE importwizard)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(evolutionv3importerplugin PROPERTIES UNITY_BUILD ON)
endif()
set_target_properties(evolutionv3importerplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/importwizard/")
target_link_libraries(evolutionv3importerplugin
......
......@@ -15,6 +15,9 @@ ecm_qt_declare_logging_category(icedoveimporter_SRCS HEADER thunderbirdplugin_de
kcoreaddons_add_plugin(icedoveimporterplugin JSON icedoveimporter.json SOURCES
${icedoveimporter_SRCS} INSTALL_NAMESPACE importwizard)
set_target_properties(icedoveimporterplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/importwizard/")
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(icedoveimporterplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(icedoveimporterplugin
KPim::ImportWizard
......
......@@ -15,6 +15,9 @@ ecm_qt_declare_logging_category(seamonkeyimporter_SRCS HEADER thunderbirdplugin_
kcoreaddons_add_plugin(seamonkeyimporterplugin JSON seamonkeyimporter.json SOURCES
${seamonkeyimporter_SRCS} INSTALL_NAMESPACE importwizard)
set_target_properties(seamonkeyimporterplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/importwizard/")
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(seamonkeyimporterplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(seamonkeyimporterplugin
KPim::ImportWizard
......
......@@ -13,6 +13,9 @@ ecm_qt_declare_logging_category(sylpheedimporter_SRCS HEADER sylpheedplugin_debu
kcoreaddons_add_plugin(sylpheedimporterplugin JSON sylpheedimporter.json SOURCES
${sylpheedimporter_SRCS} INSTALL_NAMESPACE importwizard)
set_target_properties(sylpheedimporterplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/importwizard/")
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(sylpheedimporterplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(sylpheedimporterplugin
KPim::ImportWizard
......
......@@ -13,6 +13,9 @@ ecm_qt_declare_logging_category(thunderbirdimporter_SRCS HEADER thunderbirdplugi
kcoreaddons_add_plugin(thunderbirdimporterplugin JSON thunderbirdimporter.json SOURCES
${thunderbirdimporter_SRCS} INSTALL_NAMESPACE importwizard)
set_target_properties(thunderbirdimporterplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/importwizard/")
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(thunderbirdimporterplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(thunderbirdimporterplugin
KPim::ImportWizard
......
......@@ -13,6 +13,9 @@ ecm_qt_declare_logging_category(trojitaimporter_SRCS HEADER trojitaplugin_debug.
kcoreaddons_add_plugin(trojitaimporterplugin JSON trojitaimporter.json SOURCES
${trojitaimporter_SRCS} INSTALL_NAMESPACE importwizard)
set_target_properties(trojitaimporterplugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/importwizard/")
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(trojitaimporterplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(trojitaimporterplugin
......
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