Проверки оформлены в виде опций

This commit is contained in:
Andrei Astafev 2019-07-02 08:08:05 +03:00
parent 717c01c7dd
commit 27c5306d1f

View File

@ -1,5 +1,7 @@
if(CMAKE_CXX_COMPILER_IS_CLANG OR CMAKE_CXX_COMPILER_IS_GCC) if(CMAKE_CXX_COMPILER_IS_CLANG OR CMAKE_CXX_COMPILER_IS_GCC)
option(SANITIZE_THREAD "Enable thread sanitizer" OFF)
option(SANITIZE_ADDRESS "Enable address sanitizer" OFF)
if(SANITIZE_THREAD AND SANITIZE_ADDRESS) if(SANITIZE_THREAD AND SANITIZE_ADDRESS)
message(FATAL_ERROR "AddressSanitizer is not compatible with ThreadSanitizer.") message(FATAL_ERROR "AddressSanitizer is not compatible with ThreadSanitizer.")
endif() endif()