# Tests for smartbotic-database # Vector storage integration test # Compiles memory_store.cpp directly — no dependency on the full service executable. set(TEST_VECTOR_SOURCES test_vector_storage.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../service/src/memory_store.cpp ) add_executable(test_vector_storage ${TEST_VECTOR_SOURCES}) target_include_directories(test_vector_storage PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../service/src ) # nlohmann/json if(TARGET nlohmann_json::nlohmann_json) target_link_libraries(test_vector_storage PRIVATE nlohmann_json::nlohmann_json) else() target_include_directories(test_vector_storage PRIVATE ${NLOHMANN_JSON_INCLUDE_DIRS}) endif() # spdlog if(TARGET spdlog::spdlog) target_link_libraries(test_vector_storage PRIVATE spdlog::spdlog) else() target_link_libraries(test_vector_storage PRIVATE ${SPDLOG_LIBRARIES}) target_include_directories(test_vector_storage PRIVATE ${SPDLOG_INCLUDE_DIRS}) endif() # Threads (required by MemoryStore background threads) find_package(Threads REQUIRED) target_link_libraries(test_vector_storage PRIVATE Threads::Threads) # Register with CTest enable_testing() add_test(NAME vector_storage COMMAND test_vector_storage)