Fix the condition that enables/defaults exceptions

Not sure why it worked at implementation time. But now it definitely
doesn't. We may check the EXCEPTIONS flag value, since it's the
equivalent of its presence/non-presence in the argument list.

Amends f98fd705290ac7bd9434552a07e38b775e6a6dbf

Task-number: QTBUG-118901
Pick-to: 6.9
Change-Id: I9769b4921a2f72d31aea2b0bffd2511edd89f88f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2025-03-17 10:07:25 +01:00
parent 027624b4d5
commit 7106e492bc
4 changed files with 4 additions and 4 deletions

View File

@ -227,7 +227,7 @@ function(qt_internal_add_3rdparty_library target)
qt_autogen_tools_initial_setup(${target})
endif()
if(NOT DEFINED arg_EXCEPTIONS)
if(NOT arg_EXCEPTIONS)
qt_internal_set_exceptions_flags("${target}" "DEFAULT")
else()
qt_internal_set_exceptions_flags("${target}" "${arg_EXCEPTIONS}")

View File

@ -188,7 +188,7 @@ function(qt_internal_add_executable name)
MACOSX_BUNDLE "${arg_GUI}"
)
if(NOT DEFINED arg_EXCEPTIONS)
if(NOT arg_EXCEPTIONS)
qt_internal_set_exceptions_flags("${name}" "DEFAULT")
else()
qt_internal_set_exceptions_flags("${name}" "${arg_EXCEPTIONS}")

View File

@ -664,7 +664,7 @@ function(qt_internal_add_module target)
# thus we can't use qt_internal_extend_target()'s PUBLIC_DEFINES option.
target_compile_definitions(${target} INTERFACE QT_${module_define_infix}_LIB)
if(NOT DEFINED arg_EXCEPTIONS)
if(NOT arg_EXCEPTIONS)
qt_internal_set_exceptions_flags("${target}" "DEFAULT")
else()
qt_internal_set_exceptions_flags("${target}" "${arg_EXCEPTIONS}")

View File

@ -323,7 +323,7 @@ function(qt_internal_add_plugin target)
qt_internal_add_repo_local_defines("${target}")
if(NOT DEFINED arg_EXCEPTIONS)
if(NOT arg_EXCEPTIONS)
qt_internal_set_exceptions_flags("${target}" "DEFAULT")
else()
qt_internal_set_exceptions_flags("${target}" "${arg_EXCEPTIONS}")