From 6f92e9da2f6b0223c34728da34be65d76d5db485 Mon Sep 17 00:00:00 2001 From: sanine Date: Thu, 23 Sep 2021 22:06:41 -0500 Subject: add basic test framework --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b11d68..2934ec2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,3 +40,15 @@ endif() target_link_libraries(honey ${LIBRARIES}) +# build tests (optional) + +set(TEST_ROOT ${CMAKE_SOURCE_DIR}/src/test) +set(TEST_SOURCES + ${TEST_ROOT}/test_main.c + ${TEST_ROOT}/logging/logging_tests.c + ) +add_executable(test EXCLUDE_FROM_ALL ${TEST_SOURCES}) +set_target_properties(test PROPERTIES + C_STANDARD 99 + CMAKE_C_FLAGS "-Wall -Wextra -Werror -Wfatal-errors -Wpedantic") +target_link_libraries(test ${LUA_LIBRARIES} honeysuckle) -- cgit v1.2.1