summaryrefslogtreecommitdiffstats
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 0000000..d4757da
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,35 @@
+set(CMAKE_BUILD_TYPE Debug)
+
+add_executable(test_pfx test_pfx.c)
+target_link_libraries(test_pfx rtrlib_static)
+add_coverage(test_pfx)
+add_executable(test_trie test_trie.c)
+target_link_libraries(test_trie rtrlib_static)
+add_coverage(test_trie)
+add_executable(test_pfx_locks test_pfx_locks.c)
+target_link_libraries(test_pfx_locks rtrlib_static)
+add_coverage(test_pfx_locks)
+add_executable(test_ht_spkitable test_ht_spkitable.c)
+target_link_libraries(test_ht_spkitable rtrlib_static)
+add_coverage(test_ht_spkitable)
+add_executable(test_ht_spkitable_locks test_ht_spkitable_locks.c)
+target_link_libraries(test_ht_spkitable_locks rtrlib_static)
+add_coverage(test_ht_spkitable_locks)
+add_executable(test_live_validation test_live_validation.c)
+target_link_libraries(test_live_validation rtrlib_static)
+add_coverage(test_live_validation)
+add_executable(test_ipaddr test_ipaddr.c)
+target_link_libraries(test_ipaddr rtrlib_static)
+add_coverage(test_ipaddr)
+add_executable(test_getbits test_getbits.c)
+target_link_libraries(test_getbits rtrlib_static)
+add_coverage(test_getbits)
+add_executable(test_dynamic_groups test_dynamic_groups.c)
+target_link_libraries(test_dynamic_groups rtrlib_static)
+add_coverage(test_dynamic_groups)
+
+
+if(UNIT_TESTING AND NOT APPLE)
+ find_package(CMocka REQUIRED)
+ add_subdirectory(unittests)
+endif(UNIT_TESTING AND NOT APPLE)