Commit e0236c45 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 714cf24a
Pipeline #44161 passed with stage
in 19 minutes and 10 seconds
......@@ -146,7 +146,17 @@ endif()
add_definitions(-DQT_NO_EMIT)
kde_enable_exceptions()
#Laurent: disable for the moment
#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(pics)
add_subdirectory(src)
......
......@@ -334,6 +334,9 @@ ecm_add_app_icon(_kleopatra_SRCS ICONS ${ICONS_SRCS})
qt5_add_resources(_kleopatra_SRCS kleopatra.qrc)
add_executable(kleopatra_bin ${_kleopatra_SRCS} ${_kleopatra_uiserver_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kleopatra_bin PROPERTIES UNITY_BUILD ON)
endif()
set_target_properties(kleopatra_bin PROPERTIES OUTPUT_NAME kleopatra)
target_link_libraries(kleopatra_bin
......
......@@ -29,6 +29,9 @@ if(WIN32)
endif()
add_executable(kwatchgnupg ${kwatchgnupg_SRCS})
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kwatchgnupg PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kwatchgnupg
......
......@@ -31,6 +31,10 @@ set_target_properties(kleopatraclientcore PROPERTIES
VERSION ${libkleopatraclient_version}
SOVERSION ${libkleopatraclient_soversion}
)
if (COMPILE_WITH_CMAKE_SUPPORT)
set_target_properties(kleopatraclientcore PROPERTIES UNITY_BUILD ON)
endif()
if(WIN32)
if(ASSUAN2_FOUND)
......
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