forked from qt-creator/qt-creator
Increase concept diagnostic depth to 8
Reading concept errors is sometimes quite hard because they say that the constraint was failing but not why. With a deeper diagnostic stack, it is easier to understand why it was failing. Change-Id: I863a23457bea390f50f9c458b5e82a24e17a26ea Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -314,6 +314,8 @@ function(add_qtc_library name)
|
|||||||
qtc_enable_sanitize("${name}" ${SANITIZE_FLAGS})
|
qtc_enable_sanitize("${name}" ${SANITIZE_FLAGS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
qtc_deeper_concept_diagnostic_depth("${name}")
|
||||||
|
|
||||||
if (NAMELINK_OPTION AND NOT QTC_STATIC_BUILD)
|
if (NAMELINK_OPTION AND NOT QTC_STATIC_BUILD)
|
||||||
install(TARGETS ${name}
|
install(TARGETS ${name}
|
||||||
LIBRARY
|
LIBRARY
|
||||||
@@ -534,6 +536,8 @@ function(add_qtc_plugin target_name)
|
|||||||
qtc_enable_sanitize("${name}" ${SANITIZE_FLAGS})
|
qtc_enable_sanitize("${name}" ${SANITIZE_FLAGS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
qtc_deeper_concept_diagnostic_depth("${name}")
|
||||||
|
|
||||||
extend_qtc_target(${target_name}
|
extend_qtc_target(${target_name}
|
||||||
INCLUDES ${_arg_INCLUDES}
|
INCLUDES ${_arg_INCLUDES}
|
||||||
SYSTEM_INCLUDES ${_arg_SYSTEM_INCLUDES}
|
SYSTEM_INCLUDES ${_arg_SYSTEM_INCLUDES}
|
||||||
@@ -762,6 +766,8 @@ function(add_qtc_executable name)
|
|||||||
qtc_enable_sanitize("${name}" ${SANITIZE_FLAGS})
|
qtc_enable_sanitize("${name}" ${SANITIZE_FLAGS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
qtc_deeper_concept_diagnostic_depth("${name}")
|
||||||
|
|
||||||
extend_qtc_target("${name}"
|
extend_qtc_target("${name}"
|
||||||
INCLUDES "${CMAKE_BINARY_DIR}/src" ${_arg_INCLUDES}
|
INCLUDES "${CMAKE_BINARY_DIR}/src" ${_arg_INCLUDES}
|
||||||
DEFINES ${default_defines_copy} ${TEST_DEFINES} ${_arg_DEFINES}
|
DEFINES ${default_defines_copy} ${TEST_DEFINES} ${_arg_DEFINES}
|
||||||
|
@@ -195,6 +195,12 @@ function(qtc_enable_sanitize _target _sanitize_flags)
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
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()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
function(qtc_add_link_flags_no_undefined target)
|
function(qtc_add_link_flags_no_undefined target)
|
||||||
# needs CheckLinkerFlags
|
# needs CheckLinkerFlags
|
||||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18 AND NOT MSVC AND NOT APPLE)
|
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18 AND NOT MSVC AND NOT APPLE)
|
||||||
|
Reference in New Issue
Block a user