Skip to content

LLM inference in C/C++

C++ ggml

cmake: skip cvector-generator and export-lora when CPU backend is disabled (#24053)

Andrea Richiardi7ac5a4225ef6
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()