diff --git a/CMakeLists.txt b/CMakeLists.txt index d367d44..cf72818 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,10 @@ if(BUILD_TESTING) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address,undefined -fno-omit-frame-pointer -O0") elseif(TSAN_BUILD AND NOT ASAN_BUILD) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=thread -fno-omit-frame-pointer -O0") + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-tsan") + endif() + else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto=auto -O3") endif()