c-resources/CPlusPlus20ForProgrammers-m.../examples/libraries/concurrencpp/cmake/concurrencppInjectTSAN.cmake

11 lines
292 B
CMake
Raw Normal View History

2024-04-09 06:45:18 +00:00
# Inject sanitizer flag as a build requirement
#
macro(add_library TARGET)
_add_library(${ARGV})
if("${TARGET}" STREQUAL "concurrencpp")
target_compile_options(concurrencpp PUBLIC -fsanitize=thread)
target_link_options(concurrencpp PUBLIC -fsanitize=thread)
endif()
endmacro()