From 7ac5a4225ef6d5203e4c637987cc187a49c58abb Mon Sep 17 00:00:00 2001 From: Andrea Richiardi Date: Thu, 4 Jun 2026 04:13:19 -0600 Subject: [PATCH] cmake: skip cvector-generator and export-lora when CPU backend is disabled (#24053) --- tools/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index a60d3dab46..780df32661 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()