summaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorLevent Kaya <levent@dev>2025-11-05 22:11:58 +0300
committerLevent Kaya <levent@dev>2025-11-05 22:11:58 +0300
commitf6f40266ba57ab2df99b897c375f85f0a8a97856 (patch)
treea344923e53224f646fbcbb1abaf3befe6e1ea0d5 /tests/CMakeLists.txt
parentce4e4020854e106ead6f505094c668cd896d8817 (diff)
[feature] basic structure
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 0000000..67baeda
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Unit tests for BoltDBG
+
+# Optionally enable sanitizers for test builds
+if(BOLTDBG_ENABLE_ASAN)
+ add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
+ add_link_options(-fsanitize=address)
+endif()
+
+# Collect test sources
+set(TEST_SOURCES
+ test_main.cpp
+ test_logger.cpp
+)
+
+add_executable(boltdbg_tests ${TEST_SOURCES})
+target_include_directories(boltdbg_tests PRIVATE ${CMAKE_SOURCE_DIR}/include)
+target_link_libraries(boltdbg_tests PRIVATE libboltdbg)
+
+# If using CTest (already enabled from top-level)
+add_test(NAME boltdbg_tests COMMAND boltdbg_tests)