From 516bd6eb9711b7eb97ebf1a18c58e955a7b7d8ee Mon Sep 17 00:00:00 2001 From: Andrea Richiardi Date: Tue, 2 Jun 2026 21:18:17 +0000 Subject: [PATCH] cmake: skip cvector-generator and export-lora when CPU backend is disabled --- tools/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index a60d3dab469a..780df3266132 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -33,8 +33,8 @@ else() if (GGML_RPC) add_subdirectory(rpc) endif() - if (NOT GGML_BACKEND_DL) - # these examples use the backends directly and cannot be built with dynamic loading + if (NOT GGML_BACKEND_DL AND GGML_CPU) + # these tools use backends directly (no dynamic loading) and depend on CPU backend symbols add_subdirectory(cvector-generator) add_subdirectory(export-lora) endif()