File tree Expand file tree Collapse file tree 14 files changed +54
-13
lines changed Expand file tree Collapse file tree 14 files changed +54
-13
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,12 @@ if (MSVC)
5858 add_compile_options ("$<$<COMPILE_LANGUAGE:CXX>:/bigobj>" )
5959endif ()
6060
61+ if (CMAKE_SYSTEM_NAME STREQUAL "iOS" )
62+ set (LLAMA_TOOLS_INSTALL_DEFAULT OFF )
63+ else ()
64+ set (LLAMA_TOOLS_INSTALL_DEFAULT ${LLAMA_STANDALONE} )
65+ endif ()
66+
6167#
6268# option list
6369#
@@ -82,6 +88,7 @@ option(LLAMA_BUILD_TESTS "llama: build tests" ${LLAMA_STANDALONE})
8288option (LLAMA_BUILD_TOOLS "llama: build tools" ${LLAMA_STANDALONE} )
8389option (LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE} )
8490option (LLAMA_BUILD_SERVER "llama: build server example" ${LLAMA_STANDALONE} )
91+ option (LLAMA_TOOLS_INSTALL "llama: install tools" ${LLAMA_TOOLS_INSTALL_DEFAULT} )
8592
8693# 3rd party libs
8794option (LLAMA_CURL "llama: use libcurl to download model from an URL" ON )
Original file line number Diff line number Diff line change 11set (TARGET llama-batched-bench)
22add_executable (${TARGET} batched-bench.cpp)
3- install (TARGETS ${TARGET} RUNTIME)
43target_link_libraries (${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
54target_compile_features (${TARGET} PRIVATE cxx_std_17)
5+
6+ if (LLAMA_TOOLS_INSTALL)
7+ install (TARGETS ${TARGET} RUNTIME)
8+ endif ()
Original file line number Diff line number Diff line change 11set (TARGET llama-cvector-generator)
22add_executable (${TARGET} cvector-generator.cpp pca.hpp)
3- install (TARGETS ${TARGET} RUNTIME)
43target_link_libraries (${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
54target_compile_features (${TARGET} PRIVATE cxx_std_17)
5+
6+ if (LLAMA_TOOLS_INSTALL)
7+ install (TARGETS ${TARGET} RUNTIME)
8+ endif ()
Original file line number Diff line number Diff line change 11set (TARGET llama-export-lora)
22add_executable (${TARGET} export-lora.cpp)
3- install (TARGETS ${TARGET} RUNTIME)
43target_link_libraries (${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
54target_compile_features (${TARGET} PRIVATE cxx_std_17)
5+
6+ if (LLAMA_TOOLS_INSTALL)
7+ install (TARGETS ${TARGET} RUNTIME)
8+ endif ()
Original file line number Diff line number Diff line change 11set (TARGET llama-gguf-split)
22add_executable (${TARGET} gguf-split.cpp)
3- install (TARGETS ${TARGET} RUNTIME)
43target_link_libraries (${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
54target_compile_features (${TARGET} PRIVATE cxx_std_17)
5+
6+ if (LLAMA_TOOLS_INSTALL)
7+ install (TARGETS ${TARGET} RUNTIME)
8+ endif ()
Original file line number Diff line number Diff line change 11set (TARGET llama-imatrix)
22add_executable (${TARGET} imatrix.cpp)
3- install (TARGETS ${TARGET} RUNTIME)
43target_link_libraries (${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
54target_compile_features (${TARGET} PRIVATE cxx_std_17)
5+
6+ if (LLAMA_TOOLS_INSTALL)
7+ install (TARGETS ${TARGET} RUNTIME)
8+ endif ()
Original file line number Diff line number Diff line change 11set (TARGET llama-bench)
22add_executable (${TARGET} llama-bench.cpp)
3- install (TARGETS ${TARGET} RUNTIME)
43target_link_libraries (${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
54target_compile_features (${TARGET} PRIVATE cxx_std_17)
5+
6+ if (LLAMA_TOOLS_INSTALL)
7+ install (TARGETS ${TARGET} RUNTIME)
8+ endif ()
Original file line number Diff line number Diff line change 11set (TARGET llama-cli)
22add_executable (${TARGET} main.cpp)
3- install (TARGETS ${TARGET} RUNTIME)
43target_link_libraries (${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
54target_compile_features (${TARGET} PRIVATE cxx_std_17)
5+
6+ if (LLAMA_TOOLS_INSTALL)
7+ install (TARGETS ${TARGET} RUNTIME)
8+ endif ()
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ add_executable(llama-qwen2vl-cli deprecation-warning.cpp)
5555set (TARGET llama-mtmd-cli)
5656add_executable (${TARGET} mtmd-cli.cpp)
5757set_target_properties (${TARGET} PROPERTIES OUTPUT_NAME llama-mtmd-cli)
58- if (NOT CMAKE_SYSTEM_NAME STREQUAL "iOS" )
58+ if (LLAMA_TOOLS_INSTALL )
5959 install (TARGETS ${TARGET} RUNTIME)
6060endif ()
6161target_link_libraries (${TARGET} PRIVATE common mtmd Threads::Threads)
Original file line number Diff line number Diff line change 11set (TARGET llama-perplexity)
22add_executable (${TARGET} perplexity.cpp)
3- install (TARGETS ${TARGET} RUNTIME)
43target_link_libraries (${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
54target_compile_features (${TARGET} PRIVATE cxx_std_17)
5+
6+ if (LLAMA_TOOLS_INSTALL)
7+ install (TARGETS ${TARGET} RUNTIME)
8+ endif ()
You can’t perform that action at this time.
0 commit comments