From d14f15f380b314fa11b5e935b3dfa2402b03f82c Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Fri, 4 Aug 2023 11:12:43 +0200 Subject: [PATCH] Allow disabling QT_USE_QSTRINGBUILDER definition for tool targets Currently QT_USE_QSTRINGBUILDER is added for all Qt tool targets by default, and it's not possible to remove this definition. Replace this definition with the generator expression that is propagated by the PlatformToolInternal target. Change-Id: Iac3bd3ea76e7b439cf7957146b4b6dd20ecdbe3a Reviewed-by: Alexandru Croitor --- cmake/QtInternalTargets.cmake | 2 +- cmake/QtToolHelpers.cmake | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index d8ccdefcb0..569fddbbc6 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -160,7 +160,7 @@ qt_internal_add_global_definition(QT_NO_AS_CONST) qt_internal_add_global_definition(QT_NO_QEXCHANGE) qt_internal_add_global_definition(QT_NO_NARROWING_CONVERSIONS_IN_CONNECT) qt_internal_add_global_definition(QT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH) -qt_internal_add_global_definition(QT_USE_QSTRINGBUILDER SCOPE PLUGIN) +qt_internal_add_global_definition(QT_USE_QSTRINGBUILDER SCOPE PLUGIN TOOL) if(WARNINGS_ARE_ERRORS) qt_internal_set_warnings_are_errors_flags(PlatformModuleInternal INTERFACE) diff --git a/cmake/QtToolHelpers.cmake b/cmake/QtToolHelpers.cmake index db18a4dbfd..9fa84146b8 100644 --- a/cmake/QtToolHelpers.cmake +++ b/cmake/QtToolHelpers.cmake @@ -119,7 +119,6 @@ function(qt_internal_add_tool target_name) INCLUDE_DIRECTORIES ${arg_INCLUDE_DIRECTORIES} DEFINES - QT_USE_QSTRINGBUILDER ${arg_DEFINES} ${deprecation_define} ${corelib}