From e014d3cc269c636767528f2cdd716fc6badcaa89 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Mon, 20 Apr 2026 18:49:45 -0700 Subject: Integration with ctest --- plugin/CMakeLists.txt | 2 +- simloop/CMakeLists.txt | 4 +++- test/CMakeLists.txt | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt index 68cbe30..c132c0a 100644 --- a/plugin/CMakeLists.txt +++ b/plugin/CMakeLists.txt @@ -33,6 +33,6 @@ add_executable(plugin_test target_link_libraries(plugin_test plugin - test) + ctest) target_compile_options(plugin_test PRIVATE -DUNIT_TEST -DNDEBUG -Wall -Wextra -Wpedantic) diff --git a/simloop/CMakeLists.txt b/simloop/CMakeLists.txt index fe7f954..528e65f 100644 --- a/simloop/CMakeLists.txt +++ b/simloop/CMakeLists.txt @@ -22,6 +22,8 @@ add_executable(simloop_test target_link_libraries(simloop_test simloop - test) + ctest) target_compile_options(simloop_test PRIVATE -DUNIT_TEST -DNDEBUG -Wall -Wextra -Wpedantic) + +add_test(NAME simloop_test COMMAND simloop_test --unittest) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a35fde4..9fe9a9c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -6,8 +6,8 @@ set(CMAKE_C_STANDARD 23) set(CMAKE_C_STANDARD_REQUIRED On) set(CMAKE_C_EXTENSIONS Off) -add_library(test INTERFACE +add_library(ctest INTERFACE test.h) -target_include_directories(test INTERFACE +target_include_directories(ctest INTERFACE .) -- cgit v1.2.3