]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
cmake : check if KleidiAI API has been fetched (#19640)
authorDaniel Bevenius <redacted>
Sun, 15 Feb 2026 12:59:38 +0000 (13:59 +0100)
committerGitHub <redacted>
Sun, 15 Feb 2026 12:59:38 +0000 (13:59 +0100)
This commit addresses a build issue with the KleidiAI backend when
building multiple cpu backends. Commmit
3a00c98584e42a20675b6569d81beadb282b0952 ("cmake : fix KleidiAI install
target failure with EXCLUDE_FROM_ALL") introduced a change where
FetchContent_Populate is called instead of FetchContent_MakeAvailable,
where the latter does handle this case (it is idempotent but
FetchContent_Populate is not).

I missed this during my review and I should not have commited without
verifying the CI failure, sorry about that.

ggml/src/ggml-cpu/CMakeLists.txt

index 6aea7f7bfb952486b0e0a26c7253bcc51e8594ef..43d6f7f54f7a61d4ec062e8675dca8336c7481a9 100644 (file)
@@ -576,13 +576,13 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
             DOWNLOAD_EXTRACT_TIMESTAMP NEW
             URL_HASH MD5=${KLEIDIAI_ARCHIVE_MD5})
 
-        FetchContent_Populate(KleidiAI_Download)
         FetchContent_GetProperties(KleidiAI_Download
             SOURCE_DIR  KLEIDIAI_SRC
             POPULATED   KLEIDIAI_POPULATED)
 
         if (NOT KLEIDIAI_POPULATED)
-            message(FATAL_ERROR "KleidiAI source downloaded failed.")
+            FetchContent_Populate(KleidiAI_Download)
+            FetchContent_GetProperties(KleidiAI_Download SOURCE_DIR KLEIDIAI_SRC)
         endif()
 
         add_compile_definitions(GGML_USE_CPU_KLEIDIAI)