Skip to content

Commit 1c1c2c7

Browse files
committed
clarification
1 parent 64faafc commit 1c1c2c7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ add_subdirectory(src)
168168
# utils, programs, examples and tests
169169
#
170170

171-
if (NOT LLAMA_BUILD_EXAMPLES)
172-
# curl is only needed for examples
171+
if (NOT LLAMA_BUILD_EXAMPLES OR NOT LLAMA_BUILD_COMMON)
173172
set(LLAMA_CURL OFF)
174173
endif()
175174

common/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ set(LLAMA_COMMON_EXTRA_LIBS build_info)
8585

8686
# Use curl to download model url
8787
if (LLAMA_CURL)
88-
find_package(CURL REQUIRED)
88+
find_package(CURL)
89+
if (NOT CURL_FOUND)
90+
message(FATAL_ERROR "Could NOT find CURL. Hint: to disable this feature, set -DLLAMA_CURL=OFF")
91+
endif()
8992
target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL)
9093
include_directories(${CURL_INCLUDE_DIRS})
9194
find_library(CURL_LIBRARY curl REQUIRED)

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ endif()
133133
llama_target_and_test(test-log.cpp)
134134
llama_target_and_test(test-chat-template.cpp)
135135

136-
# this fails on windows (github hosted runner) due to missing .NET, so we disable it
136+
# this fails on windows (github hosted runner) due to curl DLL not found (exit code 0xc0000135)
137137
if (NOT WIN32)
138138
llama_target_and_test(test-arg-parser.cpp)
139139
endif()

0 commit comments

Comments
 (0)