CMake Build: Skip PCH for targets that do not have QT_NO_CAST_TO_ASCII

One example is perfparser_lib.

Change-Id: I63f20dcba3aedbc8fbf948d30980baf6afd8c110
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2020-02-14 11:59:15 +01:00
committed by Eike Ziller
parent be588f434e
commit f580b6f9f7

View File

@@ -343,6 +343,12 @@ function(enable_pch target)
return()
endif()
# Skip PCH for targets that do not have QT_NO_CAST_TO_ASCII
get_target_property(target_defines "${target}" COMPILE_DEFINITIONS)
if (NOT "QT_NO_CAST_TO_ASCII" IN_LIST target_defines)
return()
endif()
get_target_property(target_type ${target} TYPE)
if (NOT ${target_type} STREQUAL "OBJECT_LIBRARY")
function(_recursively_collect_dependencies input_target)