forked from qt-creator/qt-creator
Add option to build QtCreator with sanitizer
Fixes: QTCREATORBUG-26318 Change-Id: I44589b5bb39958eda2329b444e4857e8f61823bf Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
committed by
Cristian Adam
parent
9e8b838080
commit
efdaeaba43
@@ -154,6 +154,13 @@ function(qtc_enable_release_for_debug_configuration)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(qtc_enable_sanitize _sanitize_flags)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=${_sanitize_flags}")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(append_extra_translations target_name)
|
||||
if(NOT ARGN)
|
||||
return()
|
||||
|
||||
Reference in New Issue
Block a user