From: Borislav Stanimirov Date: Tue, 9 Jul 2024 08:38:00 +0000 (+0300) Subject: cmake : allow external ggml (#8370) X-Git-Tag: upstream/0.0.4488~1134 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=9925ca4087a34ab973b07bf06c0b770cb586830b;p=pkg%2Fggml%2Fsources%2Fllama.cpp cmake : allow external ggml (#8370) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f6cd687..cb97d879 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) #