Increase concept diagnostics depth only for C++

Before it was tested if the C++ compiler would be GCC. It was not
testing if the compiler would be C++.

Fixes: QTCREATORBUG-32583
Change-Id: I2ca3614dc4a429bc594fade81b86cedceb2ef98c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Marco Bubke
2025-03-06 09:45:27 +01:00
parent 395a801814
commit 3bf918e293

View File

@@ -196,9 +196,7 @@ function(qtc_enable_sanitize _target _sanitize_flags)
endfunction()
function(qtc_deeper_concept_diagnostic_depth _target)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options("${_target}" PUBLIC -fconcepts-diagnostics-depth=8)
endif()
target_compile_options("${_target}" PRIVATE $<$<COMPILE_LANG_AND_ID:CXX,GNU>:-fconcepts-diagnostics-depth=8>)
endfunction()
function(qtc_add_link_flags_no_undefined target)