diff --git a/CMakeLists.txt b/CMakeLists.txt index bd249e2f4a..d3d193f096 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -697,11 +697,11 @@ else() endif() endif() if(USE_TSAN) - if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") + if(CMAKE_COMPILER_IS_GNUCC AND USE_ASAN) + message(STATUS "Cannot use thread sanitization with address sanitization in gcc") + else() set(TSAN_FLAGS " -fsanitize=thread -DSANITIZER_BUILD") set(TSAN_LIBS "tsan") - else() - message(STATUS "Thread sanitization with gcc is not fully supported") endif() endif()