summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Blechmann <[email protected]>2025-07-01 16:36:47 +0800
committerTim Blechmann <[email protected]>2025-07-03 15:38:21 +0800
commit90581d7b5bdf07ec34df06f9e77d3a4a4f6f2da2 (patch)
tree52e7326e50c88dc35bdc55fd6a6a311e690fa92c
parent6f92aada9abd4ec8e83e38eb953e987558af796d (diff)
CMake: demote -Wnullability-completeness to warning for unity buildsHEADdev
Unity builds currently fail on macos with -Werror, due to -Wnullability-completeness. It seems that apple's system headers don't have every NS_ASSUME_NONNULL_BEGIN followed by a NS_ASSUME_NONNULL_END, which seems to leak into our code. Demoting the errors to a warning to make -Werror builds pass again. Pick-to: 6.10 Change-Id: I70d8ae33bf57b87feac7bb33b929b74f8cd60504 Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Alexey Edelev <[email protected]>
-rw-r--r--cmake/QtInternalTargets.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index a1f4cb7281c..1b0adccd5b5 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -94,6 +94,18 @@ function(qt_internal_set_warnings_are_errors_flags target target_scope)
${language_args}
)
endif()
+ if(APPLE)
+ qt_internal_add_compiler_dependent_flags("${target}" ${target_scope}
+ COMPILERS CLANG AppleClang
+ CONDITIONS $<BOOL:$<TARGET_PROPERTY:UNITY_BUILD>>
+ OPTIONS
+ -Wno-error=nullability-completeness
+ COMMON_CONDITIONS
+ ${common_conditions}
+ LANGUAGES
+ OBJCXX
+ )
+ endif()
# Other options are gated at compile time that are not likely to change between different build
# environments of other modules.
if(ANDROID)