message: Cannot enable both thread and undefined behavior sanitizers either
diff: @@ -107,7 +107,7 @@ if(${ENABLE_THREAD_SANITIZER})
  if(${ENABLE_SANITIZER})
  message(
  WARNING
  - "Both thread and address sanitizers are enabled. This is not supported by clang. The address sanitizer will be disabled, and we will run with only the thread sanitizer."
  + "Both thread and address sanitizers are enabled. This is not supported. The address sanitizer will be disabled, and we will run with only the thread sanitizer."
  )
  endif()
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
  @@ -120,6 +120,12 @@ elseif(${ENABLE_SANITIZER})
  endif()
  if(${ENABLE_UBSAN})
  + if(${ENABLE_THREAD_SANITIZER})
  + message(
  + WARNING
  + "Both thread and undefined sanitizers are enabled. This is not supported. The undefined sanitizer will be disabled, and we will run with only the thread sanitizer."
  + )
  + else()
  if(FORCE_ASSERT)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined -fno-sanitize-recover=all")
  if (${DISABLE_VPTR_SANITIZER})
  @@ -132,6 +138,7 @@ if(${ENABLE_UBSAN})
  endif()
  endif()
  endif()
  +endif()
  option(EXPLICIT_EXCEPTIONS "Explicitly enable C++ exceptions." FALSE)
  if(${EXPLICIT_EXCEPTIONS})
  