From d6113123b8666c32d4b718f089806a968aabe2d2 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Mon, 30 Sep 2024 18:37:16 -0700 Subject: Add plugin test. --- plugin/CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'plugin/CMakeLists.txt') diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt index f2745b2..2c34228 100644 --- a/plugin/CMakeLists.txt +++ b/plugin/CMakeLists.txt @@ -6,6 +6,8 @@ set(CMAKE_C_STANDARD 23) set(CMAKE_C_STANDARD_REQUIRED On) set(CMAKE_C_EXTENSIONS Off) +# Library. + add_library(plugin src/plugin.c) @@ -18,3 +20,19 @@ target_link_libraries(plugin PRIVATE log) target_compile_options(plugin PRIVATE -Wall -Wextra) + +# Test + +add_library(hello_plugin SHARED + test/hello_plugin.c) + +target_compile_options(hello_plugin PRIVATE -Wall -Wextra) + +add_executable(plugin_test + test/plugin_test.c) + +target_link_libraries(plugin_test + plugin + test) + +target_compile_options(plugin_test PRIVATE -DUNIT_TEST -DNDEBUG -Wall -Wextra) -- cgit v1.2.3