Skip to content

Commit 234e2ff

Browse files
authored
server : remove old LLAMA_SERVER_SSL (#16290)
Signed-off-by: Adrien Gallouët <[email protected]>
1 parent 3f81b4e commit 234e2ff

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +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)
95+
option(LLAMA_OPENSSL "llama: use openssl to support HTTPS" OFF)
9696
option(LLAMA_LLGUIDANCE "llama-common: include LLGuidance library for structured output in common utils" OFF)
9797

9898
# Required for relocatable CMake package

common/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,13 @@ 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+
endif()
9091

91-
elseif (LLAMA_OPENSSL)
92+
if (LLAMA_OPENSSL)
9293
find_package(OpenSSL)
9394
if (OpenSSL_FOUND)
9495
include(CheckCSourceCompiles)
96+
set(SAVED_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES})
9597
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
9698
check_c_source_compiles("
9799
#include <openssl/opensslv.h>
@@ -106,6 +108,7 @@ elseif (LLAMA_OPENSSL)
106108
#endif
107109
int main() { return 0; }
108110
" OPENSSL_VERSION_SUPPORTED)
111+
set(CMAKE_REQUIRED_INCLUDES ${SAVED_CMAKE_REQUIRED_INCLUDES})
109112
if (OPENSSL_VERSION_SUPPORTED)
110113
message(STATUS "OpenSSL found: ${OPENSSL_VERSION}")
111114
target_compile_definitions(${TARGET} PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT)

tools/server/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
set(TARGET llama-server)
22

3-
option(LLAMA_SERVER_SSL "Build SSL support for the server" OFF)
4-
53
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
64

75
if (MINGW)
@@ -37,12 +35,6 @@ target_include_directories(${TARGET} PRIVATE ../mtmd)
3735
target_include_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR})
3836
target_link_libraries(${TARGET} PRIVATE common mtmd ${CMAKE_THREAD_LIBS_INIT})
3937

40-
if (LLAMA_SERVER_SSL)
41-
find_package(OpenSSL REQUIRED)
42-
target_link_libraries(${TARGET} PRIVATE OpenSSL::SSL OpenSSL::Crypto)
43-
target_compile_definitions(${TARGET} PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
44-
endif()
45-
4638
if (WIN32)
4739
TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ws2_32)
4840
endif()

tools/server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ For more details, please refer to [multimodal documentation](../../docs/multimod
271271
- Using `CMake`:
272272

273273
```bash
274-
cmake -B build -DLLAMA_SERVER_SSL=ON
274+
cmake -B build -DLLAMA_OPENSSL=ON
275275
cmake --build build --config Release -t llama-server
276276
```
277277

0 commit comments

Comments
 (0)