Add ThreadSanitizer option (#2560)
Add the `SANITIZER_THREAD` CMake option which will add the `-fsanitize=thread` flag to the compiler and linker when enabled.
This commit is contained in:
parent
941f7edb95
commit
9abcd0054c
1 changed files with 6 additions and 0 deletions
|
|
@ -25,6 +25,12 @@ if(USE_CL_EXPERIMENTAL)
|
|||
add_definitions(-DCL_EXPERIMENTAL)
|
||||
endif(USE_CL_EXPERIMENTAL)
|
||||
|
||||
option(SANITIZER_THREAD "Build with the thread sanitiser" OFF)
|
||||
if (SANITIZER_THREAD)
|
||||
add_compile_options(-fsanitize=thread)
|
||||
add_link_options(-fsanitize=thread)
|
||||
endif (SANITIZER_THREAD)
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Default Configurable Test Set
|
||||
#-----------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue