mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-04-14 10:36:07 +00:00

* cmake : enable curl by default * no curl if no examples * fix build * fix build-linux-cross * add windows-setup-curl * fix * shell * fix path * fix windows-latest-cmake* * run: include_directories * LLAMA_RUN_EXTRA_LIBS * sycl: no llama_curl * no test-arg-parser on windows * clarification * try riscv64 / arm64 * windows: include libcurl inside release binary * add msg * fix mac / ios / android build * will this fix xcode? * try clearing the cache * add bunch of licenses * revert clear cache * fix xcode * fix xcode (2) * fix typo
17 lines
655 B
CMake
17 lines
655 B
CMake
set(TARGET llama-run)
|
|
add_executable(${TARGET} run.cpp linenoise.cpp/linenoise.cpp)
|
|
|
|
# TODO: avoid copying this code block from common/CMakeLists.txt
|
|
set(LLAMA_RUN_EXTRA_LIBS "")
|
|
if (LLAMA_CURL)
|
|
find_package(CURL REQUIRED)
|
|
target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL)
|
|
include_directories(${CURL_INCLUDE_DIRS})
|
|
find_library(CURL_LIBRARY curl REQUIRED)
|
|
set(LLAMA_RUN_EXTRA_LIBS ${LLAMA_RUN_EXTRA_LIBS} ${CURL_LIBRARY})
|
|
endif ()
|
|
|
|
install(TARGETS ${TARGET} RUNTIME)
|
|
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} ${LLAMA_RUN_EXTRA_LIBS})
|
|
target_compile_features(${TARGET} PRIVATE cxx_std_17)
|