From bb3386b2bfa03765c6438ef9340c7d451bbf2f4b Mon Sep 17 00:00:00 2001 From: Borislav Stanimirov Date: Mon, 8 Jul 2024 17:08:55 +0300 Subject: [PATCH] cmake : allow external ggml --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bcb0347a5d..cb17def7d40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,7 +120,10 @@ whisper_option_depr(WARNING WHISPER_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) #