update tests, add sanatizers

main
Brett 2023-09-10 13:23:49 -04:00
parent 29d69deb01
commit 0b5798fac6
1 changed files with 16 additions and 1 deletions

View File

@ -14,4 +14,19 @@ file(GLOB_RECURSE source_files src/*.cpp)
add_executable(BLT_TESTS ${source_files})
target_link_libraries(BLT_TESTS BLT_GRAPHICS)
target_link_libraries(BLT_TESTS private BLT_GRAPHICS)
if (${ENABLE_ADDRSAN} MATCHES ON)
target_compile_options(BLT_GRAPHICS PRIVATE -fsanitize=address)
target_link_options(BLT_GRAPHICS PRIVATE -fsanitize=address)
endif ()
if (${ENABLE_UBSAN} MATCHES ON)
target_compile_options(BLT_GRAPHICS PRIVATE -fsanitize=undefined)
target_link_options(BLT_GRAPHICS PRIVATE -fsanitize=undefined)
endif ()
if (${ENABLE_TSAN} MATCHES ON)
target_compile_options(BLT_GRAPHICS PRIVATE -fsanitize=thread)
target_link_options(BLT_GRAPHICS PRIVATE -fsanitize=thread)
endif ()