mirror of
https://github.com/ggerganov/llama.cpp
synced 2026-04-27 19:11:55 +02:00
* cmake : allow libcommon to be shared * cmake : rename libcommon to libllama-common * cont : set -fPIC for httplib * cont : export all symbols * cont : fix build_info exports * libs : add libllama-common-base * log : add common_log_get_verbosity_thold()
21 lines
815 B
CMake
21 lines
815 B
CMake
if (NOT WIN32 OR NOT BUILD_SHARED_LIBS)
|
|
# this tool is disabled on Windows when building with shared libraries because it uses internal functions not exported with LLAMA_API
|
|
set(TARGET llama-debug-template-parser)
|
|
add_executable(${TARGET} debug-template-parser.cpp)
|
|
target_link_libraries(${TARGET} PRIVATE llama-common llama ${CMAKE_THREAD_LIBS_INIT})
|
|
target_compile_features(${TARGET} PRIVATE cxx_std_17)
|
|
|
|
if(LLAMA_TOOLS_INSTALL)
|
|
install(TARGETS ${TARGET} RUNTIME)
|
|
endif()
|
|
endif()
|
|
|
|
set(TARGET llama-template-analysis)
|
|
add_executable(${TARGET} template-analysis.cpp)
|
|
target_link_libraries(${TARGET} PRIVATE llama-common llama ${CMAKE_THREAD_LIBS_INIT})
|
|
target_compile_features(${TARGET} PRIVATE cxx_std_17)
|
|
|
|
if(LLAMA_TOOLS_INSTALL)
|
|
install(TARGETS ${TARGET} RUNTIME)
|
|
endif()
|