File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -2,16 +2,10 @@ set(TARGET llama-finetune)
22add_executable (${TARGET} finetune.cpp)
33install (TARGETS ${TARGET} RUNTIME)
44target_link_libraries (${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
5- if (ANDROID OR (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" ))
6- target_link_libraries (${TARGET} PRIVATE -lc++)
7- endif ()
85target_compile_features (${TARGET} PRIVATE cxx_std_11)
96
107set (TARGET llama-finetune-lora)
118add_executable (${TARGET} finetune-lora.cpp)
129install (TARGETS ${TARGET} RUNTIME)
1310target_link_libraries (${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
14- if (ANDROID OR (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" ))
15- target_link_libraries (${TARGET} PRIVATE -lc++)
16- endif ()
1711target_compile_features (${TARGET} PRIVATE cxx_std_11)
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ if (BUILD_SHARED_LIBS)
5454 target_compile_definitions (llama PRIVATE LLAMA_BUILD)
5555 target_compile_definitions (llama PUBLIC LLAMA_SHARED)
5656 if (ANDROID OR (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" ))
57- target_link_libraries (llama PRIVATE -lc++)
57+ message (STATUS "Linking llama with c++_shared for Android/Termux compatibility" )
58+ target_link_libraries (llama PUBLIC c++_shared)
5859 endif ()
5960endif ()
You can’t perform that action at this time.
0 commit comments