mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-29 01:29:35 +08:00
Gabime/tsan (#3237)
* Fixed race condition in tests * Support for thread sanitizer
This commit is contained in:
@@ -80,8 +80,10 @@ function(spdlog_prepare_test test_target spdlog_lib)
|
||||
endif()
|
||||
target_link_libraries(${test_target} PRIVATE Catch2::Catch2WithMain)
|
||||
if(SPDLOG_SANITIZE_ADDRESS)
|
||||
spdlog_enable_sanitizer(${test_target})
|
||||
endif()
|
||||
spdlog_enable_addr_sanitizer(${test_target})
|
||||
elseif (SPDLOG_SANITIZE_THREAD)
|
||||
spdlog_enable_thread_sanitizer(${test_target})
|
||||
endif ()
|
||||
add_test(NAME ${test_target} COMMAND ${test_target})
|
||||
set_tests_properties(${test_target} PROPERTIES RUN_SERIAL ON)
|
||||
endfunction()
|
||||
|
Reference in New Issue
Block a user