From 83c8d0984d4f0dee6825e7f98ec224e7f78bf3a1 Mon Sep 17 00:00:00 2001 From: Pawel Cieslak Date: Fri, 27 Nov 2020 10:53:28 +0100 Subject: [PATCH] Allow tsan for gcc Signed-off-by: Pawel Cieslak --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()