Commit abf5af52 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 81c3e041
Pipeline #44158 passed with stage
in 2 minutes and 34 seconds
...@@ -36,6 +36,16 @@ add_definitions(-DQT_NO_KEYWORDS) ...@@ -36,6 +36,16 @@ add_definitions(-DQT_NO_KEYWORDS)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
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) add_subdirectory(src)
if (BUILD_TESTING) if (BUILD_TESTING)
......
...@@ -31,6 +31,10 @@ target_link_libraries(KPimPkPass ...@@ -31,6 +31,10 @@ target_link_libraries(KPimPkPass
KF5::Archive KF5::Archive
) )
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(KPimPkPass PROPERTIES UNITY_BUILD ON)
endif()
ecm_generate_headers(KPkPass_HEADERS ecm_generate_headers(KPkPass_HEADERS
HEADER_NAMES HEADER_NAMES
Barcode Barcode
......
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