From: Adrien Gallouët Date: Mon, 16 Feb 2026 15:06:48 +0000 (+0100) Subject: build : rework llama_option_depr to handle LLAMA_CURL (#19658) X-Git-Tag: gguf-v0.18.0~102 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=44084941448d841c9b12ad250da5619cddb58bd6;p=pkg%2Fggml%2Fsources%2Fllama.cpp build : rework llama_option_depr to handle LLAMA_CURL (#19658) Signed-off-by: Adrien Gallouët --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d10ab6da9..32542ecd2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,11 +115,6 @@ option(LLAMA_TESTS_INSTALL "llama: install tests" ON) option(LLAMA_OPENSSL "llama: use openssl to support HTTPS" ON) option(LLAMA_LLGUIDANCE "llama-common: include LLGuidance library for structured output in common utils" OFF) -# deprecated -option(LLAMA_CURL "llama: use libcurl to download model from an URL" OFF) -if (LLAMA_CURL) - message(WARNING "LLAMA_CURL option is deprecated and will be ignored") -endif() # Required for relocatable CMake package include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/build-info.cmake) @@ -147,10 +142,15 @@ if (NOT DEFINED GGML_CUDA_GRAPHS) endif() # transition helpers -function (llama_option_depr TYPE OLD NEW) +function (llama_option_depr TYPE OLD) if (${OLD}) - message(${TYPE} "${OLD} is deprecated and will be removed in the future.\nUse ${NEW} instead\n") - set(${NEW} ON PARENT_SCOPE) + set(NEW "${ARGV2}") + if(NEW) + message(${TYPE} "${OLD} is deprecated, use ${NEW} instead") + set(${NEW} ON PARENT_SCOPE) + else() + message(${TYPE} "${OLD} is deprecated and will be ignored") + endif() endif() endfunction() @@ -163,6 +163,7 @@ llama_option_depr(WARNING LLAMA_RPC GGML_RPC) llama_option_depr(WARNING LLAMA_SYCL GGML_SYCL) llama_option_depr(WARNING LLAMA_SYCL_F16 GGML_SYCL_F16) llama_option_depr(WARNING LLAMA_CANN GGML_CANN) +llama_option_depr(WARNING LLAMA_CURL) include("cmake/license.cmake") license_add_file("llama.cpp" "LICENSE")