common: PR feedback, rename the definition to LLAMA_USE_CURL

This commit is contained in:
Pierrick HYMBERT 2024-03-16 13:27:05 +01:00
parent a0ebdfcc5d
commit 42b25dacab
2 changed files with 3 additions and 3 deletions

View file

@ -50,7 +50,7 @@ endif()
# Check for curl # Check for curl
find_package(CURL QUIET) find_package(CURL QUIET)
if (CURL_FOUND) if (CURL_FOUND)
add_definitions(-DHAVE_CURL) add_definitions(-DLLAMA_USE_CURL)
include_directories(${CURL_INCLUDE_DIRS}) include_directories(${CURL_INCLUDE_DIRS})
link_libraries(${CURL_LIBRARIES}) link_libraries(${CURL_LIBRARIES})
else() else()

View file

@ -16,7 +16,7 @@
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
#include <cinttypes> #include <cinttypes>
#ifdef HAVE_CURL #ifdef LLAMA_USE_CURL
#include <curl/curl.h> #include <curl/curl.h>
#endif #endif
@ -1387,7 +1387,7 @@ void llama_batch_add(
batch.n_tokens++; batch.n_tokens++;
} }
#ifdef HAVE_CURL #ifdef LLAMA_USE_CURL
struct llama_model * llama_load_model_from_url(const char * model_url, const char * path_model, struct llama_model * llama_load_model_from_url(const char * model_url, const char * path_model,
struct llama_model_params params) { struct llama_model_params params) {
// Initialize libcurl // Initialize libcurl