summaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
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)