From 684d30198342880078b4fa11f3c71d35e1a2fa4f Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Wed, 22 Mar 2023 15:35:24 +0100 Subject: [PATCH] Disable Unity Build for Examples Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I20999512e557db618c14e36d62317680bc17c43a Reviewed-by: Alexandru Croitor --- cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index 2ac1db6daf..76e93ae990 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -848,6 +848,8 @@ macro(qt_examples_build_begin) cmake_parse_arguments(arg "${options}" "${singleOpts}" "${multiOpts}" ${ARGN}) + set(CMAKE_UNITY_BUILD OFF) + # Use by qt_internal_add_example. set(QT_EXAMPLE_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") @@ -984,6 +986,8 @@ macro(qt_examples_build_end) # Restore backed up CMAKE_INSTALL_PREFIX. set(CMAKE_INSTALL_PREFIX \"\${_qt_internal_examples_cmake_install_prefix_backup}\") ") + + set(CMAKE_UNITY_BUILD ${QT_UNITY_BUILD}) endmacro() function(qt_internal_add_example subdir)