From 3eca801f9d0f81fcb4b8128727fb438097141afa Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Mon, 11 Apr 2022 13:39:49 +0800 Subject: [PATCH] cmake: skip precompiled headers for generated resources resource compilation is typically not bound by parsing headers, so they don't benefit much from using precompiled headers. otoh, if we don't use precompiled headers for them, we may have better turnaround times, as these sources can be compiled in parallel with the pch compilation and they don't have to be rebuilt when a pch changes Change-Id: Ib4560ff31196e729f8efbcfb83cacfad127d90cd Reviewed-by: Alexandru Croitor --- src/corelib/Qt6CoreMacros.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 6d1ca2a0b4..1732d58e1c 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -380,6 +380,7 @@ function(qt6_add_resources outfiles ) set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC ON SKIP_AUTOUIC ON SKIP_UNITY_BUILD_INCLUSION ON + SKIP_PRECOMPILE_HEADERS ON ) list(APPEND ${outfiles} ${outfile}) endforeach() @@ -2020,6 +2021,7 @@ function(_qt_internal_process_resource target resourceName) SKIP_AUTOGEN TRUE GENERATED TRUE SKIP_UNITY_BUILD_INCLUSION TRUE + SKIP_PRECOMPILE_HEADERS TRUE ) get_target_property(target_source_dir ${target} SOURCE_DIR) if(NOT target_source_dir STREQUAL CMAKE_CURRENT_SOURCE_DIR)