From 49fc081be796f95d09d3ae8b1a0ae350c6b0b703 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 1 Jan 2026 14:06:12 +0000 Subject: [PATCH 1/3] Initial plan From 3216e549d0a76baff84ea9f723492d4d337ac9d6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 1 Jan 2026 14:13:06 +0000 Subject: [PATCH 2/3] Make CURL optional in tools/run/CMakeLists.txt Co-authored-by: TheOriginalBytePlayer <18058224+TheOriginalBytePlayer@users.noreply.github.com> --- tools/run/CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/run/CMakeLists.txt b/tools/run/CMakeLists.txt index 6ad7534e290..12820fddf8f 100644 --- a/tools/run/CMakeLists.txt +++ b/tools/run/CMakeLists.txt @@ -4,10 +4,15 @@ add_executable(${TARGET} run.cpp linenoise.cpp/linenoise.cpp) # TODO: avoid copying this code block from common/CMakeLists.txt set(LLAMA_RUN_EXTRA_LIBS "") if (LLAMA_CURL) - find_package(CURL REQUIRED) - target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL) - include_directories(${CURL_INCLUDE_DIRS}) - set(LLAMA_RUN_EXTRA_LIBS ${LLAMA_RUN_EXTRA_LIBS} ${CURL_LIBRARIES}) + find_package(CURL) + if (NOT CURL_FOUND) + message(WARNING "Could NOT find CURL for llama-run. CURL support will be disabled. Hint: to explicitly disable CURL, set -DLLAMA_CURL=OFF") + set(LLAMA_CURL OFF) + else() + target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL) + include_directories(${CURL_INCLUDE_DIRS}) + set(LLAMA_RUN_EXTRA_LIBS ${LLAMA_RUN_EXTRA_LIBS} ${CURL_LIBRARIES}) + endif() endif () if(LLAMA_TOOLS_INSTALL) From 29badac637721943cf78f79cd6c6e74910be6fe0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 1 Jan 2026 14:14:01 +0000 Subject: [PATCH 3/3] Update warning message for consistency with common/CMakeLists.txt Co-authored-by: TheOriginalBytePlayer <18058224+TheOriginalBytePlayer@users.noreply.github.com> --- tools/run/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run/CMakeLists.txt b/tools/run/CMakeLists.txt index 12820fddf8f..1d2108805c4 100644 --- a/tools/run/CMakeLists.txt +++ b/tools/run/CMakeLists.txt @@ -6,7 +6,7 @@ set(LLAMA_RUN_EXTRA_LIBS "") if (LLAMA_CURL) find_package(CURL) if (NOT CURL_FOUND) - message(WARNING "Could NOT find CURL for llama-run. CURL support will be disabled. Hint: to explicitly disable CURL, set -DLLAMA_CURL=OFF") + message(WARNING "Could NOT find CURL. Falling back to cpp-httplib. Hint: to explicitly disable CURL, set -DLLAMA_CURL=OFF") set(LLAMA_CURL OFF) else() target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL)