linking
This commit is contained in:
parent
46d9bec698
commit
b0024a6be2
3 changed files with 9 additions and 6 deletions
|
@ -700,6 +700,7 @@ target_compile_features(llama PUBLIC cxx_std_20) # don't bump
|
|||
target_link_libraries(llama PRIVATE
|
||||
ggml
|
||||
${LLAMA_EXTRA_LIBS}
|
||||
-ldynet
|
||||
)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
|
|
6
Makefile
6
Makefile
|
@ -541,6 +541,8 @@ $(info )
|
|||
|
||||
ggml.o: ggml.cpp ggml.h ggml-cuda.h
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
libdynet.o: libdynet.cpp ggml.h ggml-cuda.h
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
ggml-alloc.o: ggml-alloc.cpp ggml.h ggml-alloc.h
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
@ -551,7 +553,7 @@ ggml-backend.o: ggml-backend.cpp ggml.h ggml-backend.h
|
|||
ggml-quants.o: ggml-quants.cpp ggml.h ggml-quants.h
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
OBJS += ggml-alloc.o ggml-backend.o ggml-quants.o
|
||||
OBJS += ggml-alloc.o ggml-backend.o ggml-quants.o libdynet.o
|
||||
|
||||
llama.o: llama.cpp ggml.h ggml-alloc.h ggml-backend.h ggml-cuda.h ggml-metal.h llama.h
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
@ -585,7 +587,7 @@ clean:
|
|||
#
|
||||
|
||||
main: examples/main/main.cpp ggml.o llama.o $(COMMON_DEPS) console.o grammar-parser.o $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS)
|
||||
$(CXX) $(CXXFLAGS) $(filter-out %.h,$^) -o $@ $(LDFLAGS) -ldynet
|
||||
@echo
|
||||
@echo '==== Run ./main -h for help. ===='
|
||||
@echo
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
set(TARGET main)
|
||||
add_executable(${TARGET} main.cpp)
|
||||
install(TARGETS ${TARGET} RUNTIME)
|
||||
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_compile_features(${TARGET} PRIVATE cxx_std_11)
|
||||
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
|
||||
target_compile_features(${TARGET} PRIVATE cxx_std_20)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue