]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
cmake : allow external ggml (#8370)
authorBorislav Stanimirov <redacted>
Tue, 9 Jul 2024 08:38:00 +0000 (11:38 +0300)
committerGitHub <redacted>
Tue, 9 Jul 2024 08:38:00 +0000 (11:38 +0300)
CMakeLists.txt

index 4f6cd68724aa6b892daec322fcfd81f1f5b551eb..cb97d87913955b2f0a6fb6e885cdf3d1dcaf70ea 100644 (file)
@@ -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)
 
 #