Commit b32dd576 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 ca68e8f5
Pipeline #44276 passed with stage
in 7 minutes and 44 seconds
......@@ -57,7 +57,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()
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5GrantleeTheme")
......
......@@ -19,6 +19,9 @@ ecm_qt_declare_logging_category(libgrantleetheme_SRCS HEADER grantleetheme_debug
add_library(KF5GrantleeTheme ${libgrantleetheme_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KF5GrantleeTheme PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5GrantleeTheme BASE_NAME grantleetheme)
add_library(KF5::GrantleeTheme ALIAS KF5GrantleeTheme)
......
......@@ -9,6 +9,9 @@ set(grantleeplugin_SRCS
)
add_library(kde_grantlee_plugin MODULE ${grantleeplugin_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(kde_grantlee_plugin PROPERTIES UNITY_BUILD ON)
endif()
kpim_grantlee_adjust_plugin_name(kde_grantlee_plugin)
target_link_libraries(kde_grantlee_plugin
Grantlee5::Templates
......
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