diff options
author | 3gg <3gg@shellblade.net> | 2024-09-30 18:37:16 -0700 |
---|---|---|
committer | 3gg <3gg@shellblade.net> | 2024-09-30 18:37:16 -0700 |
commit | d6113123b8666c32d4b718f089806a968aabe2d2 (patch) | |
tree | 52c8434e23d65207259a8fd28385c2beec1f9357 /plugin/CMakeLists.txt | |
parent | da9a6a75acac8c8597d807757bbd9e60f39c31de (diff) |
Add plugin test.
Diffstat (limited to 'plugin/CMakeLists.txt')
-rw-r--r-- | plugin/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
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) | |||
6 | set(CMAKE_C_STANDARD_REQUIRED On) | 6 | set(CMAKE_C_STANDARD_REQUIRED On) |
7 | set(CMAKE_C_EXTENSIONS Off) | 7 | set(CMAKE_C_EXTENSIONS Off) |
8 | 8 | ||
9 | # Library. | ||
10 | |||
9 | add_library(plugin | 11 | add_library(plugin |
10 | src/plugin.c) | 12 | src/plugin.c) |
11 | 13 | ||
@@ -18,3 +20,19 @@ target_link_libraries(plugin PRIVATE | |||
18 | log) | 20 | log) |
19 | 21 | ||
20 | target_compile_options(plugin PRIVATE -Wall -Wextra) | 22 | target_compile_options(plugin PRIVATE -Wall -Wextra) |
23 | |||
24 | # Test | ||
25 | |||
26 | add_library(hello_plugin SHARED | ||
27 | test/hello_plugin.c) | ||
28 | |||
29 | target_compile_options(hello_plugin PRIVATE -Wall -Wextra) | ||
30 | |||
31 | add_executable(plugin_test | ||
32 | test/plugin_test.c) | ||
33 | |||
34 | target_link_libraries(plugin_test | ||
35 | plugin | ||
36 | test) | ||
37 | |||
38 | target_compile_options(plugin_test PRIVATE -DUNIT_TEST -DNDEBUG -Wall -Wextra) | ||