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

This commit is contained in:
Andrea Richiardi 2026-06-04 04:13:19 -06:00 committed by GitHub
parent e3ba22d6cc
commit 7ac5a4225e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,8 +33,8 @@ else()
if (GGML_RPC) if (GGML_RPC)
add_subdirectory(rpc) add_subdirectory(rpc)
endif() endif()
if (NOT GGML_BACKEND_DL) if (NOT GGML_BACKEND_DL AND GGML_CPU)
# these examples use the backends directly and cannot be built with dynamic loading # these tools use backends directly (no dynamic loading) and depend on CPU backend symbols
add_subdirectory(cvector-generator) add_subdirectory(cvector-generator)
add_subdirectory(export-lora) add_subdirectory(export-lora)
endif() endif()