瀏覽代碼

cmake : allow external ggml (#8370)

Borislav Stanimirov 1 年之前
父節點
當前提交
9925ca4087
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      CMakeLists.txt

+ 4 - 1
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)
 
 #