common: fix windows build
This commit is contained in:
parent
73b4b44785
commit
a3ed3d48d3
2 changed files with 9 additions and 9 deletions
|
@ -68,14 +68,14 @@ if (BUILD_SHARED_LIBS)
|
||||||
set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(${TARGET} PUBLIC .)
|
|
||||||
target_compile_features(${TARGET} PUBLIC cxx_std_11)
|
|
||||||
target_link_libraries(${TARGET} PRIVATE build_info PUBLIC llama)
|
|
||||||
|
|
||||||
# Use curl to download model url
|
# Use curl to download model url
|
||||||
if (LLAMA_CURL)
|
if (LLAMA_CURL)
|
||||||
find_package(CURL)
|
find_package(CURL)
|
||||||
add_definitions(-DLLAMA_USE_CURL)
|
add_definitions(-DLLAMA_USE_CURL)
|
||||||
target_include_directories(${TARGET} ${CURL_INCLUDE_DIRS})
|
include_directories(${CURL_INCLUDE_DIRS})
|
||||||
target_link_libraries(${TARGET} PRIVATE curl)
|
target_link_libraries(${TARGET} PRIVATE curl)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
target_include_directories(${TARGET} PUBLIC .)
|
||||||
|
target_compile_features(${TARGET} PUBLIC cxx_std_11)
|
||||||
|
target_link_libraries(${TARGET} PRIVATE build_info PUBLIC llama)
|
||||||
|
|
|
@ -16,9 +16,6 @@
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#ifdef LLAMA_USE_CURL
|
|
||||||
#include <curl/curl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__APPLE__) && defined(__MACH__)
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -40,6 +37,9 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(LLAMA_USE_CURL)
|
||||||
|
#include <curl/curl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#pragma warning(disable: 4244 4267) // possible loss of data
|
#pragma warning(disable: 4244 4267) // possible loss of data
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
#define GGML_USE_CUBLAS_SYCL_VULKAN
|
#define GGML_USE_CUBLAS_SYCL_VULKAN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LLAMA_USE_CURL
|
#if defined(LLAMA_USE_CURL)
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <linux/limits.h>
|
#include <linux/limits.h>
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue