From 9925ca4087a34ab973b07bf06c0b770cb586830b Mon Sep 17 00:00:00 2001 From: Borislav Stanimirov Date: Tue, 9 Jul 2024 11:38:00 +0300 Subject: [PATCH] cmake : allow external ggml (#8370) --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f6cd6872..cb97d8791 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,7 +115,10 @@ llama_option_depr(WARNING LLAMA_SYCL_F16 GGML_SYCL_F16) # build the library # -add_subdirectory(ggml) +if (NOT TARGET ggml) + add_subdirectory(ggml) + # ... otherwise assume ggml is added by a parent CMakeLists.txt +endif() add_subdirectory(src) #