Files
sem2Graph/test/CMakeLists.txt
2026-05-06 09:45:22 -06:00

24 lines
524 B
CMake

find_package(cmocka REQUIRED)
add_executable(test_graph test_graph.c)
target_link_libraries(test_graph
graph
cmocka::cmocka
)
# Sanitizers (portables)
if(ARRAYLIST_ENABLE_SANITIZERS)
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(test_graph PRIVATE
-fsanitize=address
-fno-omit-frame-pointer
)
target_link_options(test_graph PRIVATE
-fsanitize=address
)
endif()
endif()
add_test(NAME graph_tests COMMAND test_graph)