Skip to content

Commit

Permalink
fix: fix patch step
Browse files Browse the repository at this point in the history
  • Loading branch information
hans00 authored May 7, 2024
1 parent 0777434 commit 575219e
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,14 @@ find_program(PATCH patch REQUIRED)

add_custom_target(
patch ALL
COMMAND ${PATCH} -p1 -n -i ${CMAKE_SOURCE_DIR}/patches/llama.patch
COMMAND ${PATCH} -p1 -N -i ${CMAKE_SOURCE_DIR}/patches/llama.patch
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/llama.cpp
COMMENT "Applying patches"
)

set(LLAMA_STATIC ON CACHE BOOL "Build llama as static library")
add_subdirectory("src/llama.cpp")

# apply patches
set(PATCH_FILE ${CMAKE_SOURCE_DIR}/patches/llama.patch)
add_custom_target(patch)
add_custom_command(
TARGET patch
COMMAND patch -N -p1 < ${PATCH_FILE} || true
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/llama.cpp

)
add_dependencies(ggml patch)

file(
GLOB SOURCE_FILES
"src/addons.cc"
Expand Down

0 comments on commit 575219e

Please sign in to comment.