Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
4fd5f352
Unverified
Commit
4fd5f352
authored
Jul 05, 2024
by
Jeffrey Morgan
Committed by
GitHub
Jul 05, 2024
Browse files
fix cmake build (#5505)
parent
842f85f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
llm/ext_server/CMakeLists.txt
llm/ext_server/CMakeLists.txt
+16
-13
llm/generate/gen_common.sh
llm/generate/gen_common.sh
+1
-0
No files found.
llm/ext_server/CMakeLists.txt
View file @
4fd5f352
set
(
TARGET ollama_llama_server
)
set
(
TARGET ollama_llama_server
)
option
(
LLAMA_SERVER_VERBOSE
"Build verbose logging option for Server"
ON
)
option
(
LLAMA_SERVER_VERBOSE
"Build verbose logging option for Server"
ON
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
)
include_directories
(
${
CMAKE_CURRENT_SOURCE_DIR
}
)
add_executable
(
${
TARGET
}
server.cpp utils.hpp json.hpp httplib.h
)
add_executable
(
${
TARGET
}
server.cpp utils.hpp json.hpp httplib.h
)
install
(
TARGETS
${
TARGET
}
RUNTIME
)
target_compile_definitions
(
${
TARGET
}
PRIVATE
target_compile_definitions
(
${
TARGET
}
PRIVATE
SERVER_VERBOSE=$<BOOL:
${
LLAMA_SERVER_VERBOSE
}
>
SERVER_VERBOSE=$<BOOL:
${
LLAMA_SERVER_VERBOSE
}
>
)
)
target_link_libraries
(
${
TARGET
}
PRIVATE ggml llama common llava
${
CMAKE_THREAD_LIBS_INIT
}
)
target_link_libraries
(
${
TARGET
}
PRIVATE ggml llama common llava
${
CMAKE_THREAD_LIBS_INIT
}
)
install
(
TARGETS ollama_llama_server ggml llama
if
(
WIN32
)
RUNTIME DESTINATION
"
${
CMAKE_BINARY_DIR
}
/bin"
TARGET_LINK_LIBRARIES
(
${
TARGET
}
PRIVATE ws2_32
)
LIBRARY DESTINATION
"
${
CMAKE_BINARY_DIR
}
/bin"
endif
()
COMPONENT ollama_llama_server
)
if
(
WIN32
)
TARGET_LINK_LIBRARIES
(
${
TARGET
}
PRIVATE ws2_32
)
endif
()
target_compile_features
(
${
TARGET
}
PRIVATE cxx_std_11
)
target_compile_features
(
${
TARGET
}
PRIVATE cxx_std_11
)
\ No newline at end of file
llm/generate/gen_common.sh
View file @
4fd5f352
...
@@ -81,6 +81,7 @@ apply_patches() {
...
@@ -81,6 +81,7 @@ apply_patches() {
build
()
{
build
()
{
cmake
-S
${
LLAMACPP_DIR
}
-B
${
BUILD_DIR
}
${
CMAKE_DEFS
}
cmake
-S
${
LLAMACPP_DIR
}
-B
${
BUILD_DIR
}
${
CMAKE_DEFS
}
cmake
--build
${
BUILD_DIR
}
${
CMAKE_TARGETS
}
-j8
cmake
--build
${
BUILD_DIR
}
${
CMAKE_TARGETS
}
-j8
cmake
--install
${
BUILD_DIR
}
--component
ollama_llama_server
}
}
compress
()
{
compress
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment