Skip to content

Commit 2e71abc

Browse files
committed
test: link error tests with sanitizers
1 parent 8c6a56f commit 2e71abc

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

test/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,17 @@ target_link_libraries(vix_error_test
99
vix::error
1010
)
1111

12+
if (VIX_ENABLE_SANITIZERS AND NOT MSVC)
13+
target_compile_options(vix_error_test
14+
PRIVATE
15+
-fno-omit-frame-pointer
16+
-fsanitize=address,undefined
17+
)
18+
19+
target_link_options(vix_error_test
20+
PRIVATE
21+
-fsanitize=address,undefined
22+
)
23+
endif()
24+
1225
add_test(NAME vix_error_test COMMAND vix_error_test)

0 commit comments

Comments
 (0)