1
0

CMakeLists.txt 795 B

1234567891011121314151617181920212223
  1. set(TARGET llama-run)
  2. add_executable(${TARGET} run.cpp linenoise.cpp/linenoise.cpp)
  3. # TODO: avoid copying this code block from common/CMakeLists.txt
  4. set(LLAMA_RUN_EXTRA_LIBS "")
  5. if (LLAMA_CURL)
  6. find_package(CURL REQUIRED)
  7. target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL)
  8. include_directories(${CURL_INCLUDE_DIRS})
  9. set(LLAMA_RUN_EXTRA_LIBS ${LLAMA_RUN_EXTRA_LIBS} ${CURL_LIBRARIES})
  10. endif ()
  11. if(LLAMA_TOOLS_INSTALL)
  12. install(TARGETS ${TARGET} RUNTIME)
  13. endif()
  14. if (CMAKE_SYSTEM_NAME MATCHES "AIX")
  15. # AIX's flock() function comes from libbsd.a
  16. target_link_libraries(${TARGET} PRIVATE -lbsd)
  17. endif()
  18. target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} ${LLAMA_RUN_EXTRA_LIBS})
  19. target_compile_features(${TARGET} PRIVATE cxx_std_17)