Skip to content

Commit ace6a54

Browse files
authored
build : add LLAMA_OPENSSL option (#16287)
Introduce a new `LLAMA_OPENSSL` option, enabled by default. This preserves the previous default (libcurl first, OpenSSL as fallback), while allowing OpenSSL to be disabled if desired. Signed-off-by: Adrien Gallouët <[email protected]>
1 parent 72b24d9 commit ace6a54

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ option(LLAMA_TOOLS_INSTALL "llama: install tools" ${LLAMA_TOOLS_INSTALL_
9292

9393
# 3rd party libs
9494
option(LLAMA_CURL "llama: use libcurl to download model from an URL" ON)
95+
option(LLAMA_OPENSSL "llama: use openssl to download model from an URL" ON)
9596
option(LLAMA_LLGUIDANCE "llama-common: include LLGuidance library for structured output in common utils" OFF)
9697

9798
# Required for relocatable CMake package

common/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ if (LLAMA_CURL)
8787
target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL)
8888
include_directories(${CURL_INCLUDE_DIRS})
8989
set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARIES})
90-
else()
90+
91+
elseif (LLAMA_OPENSSL)
9192
find_package(OpenSSL)
9293
if (OpenSSL_FOUND)
9394
include(CheckCSourceCompiles)

0 commit comments

Comments
 (0)