Findllamacpp.cmake 753 B

1234567891011121314151617181920212223242526
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. include(FetchContent)
  4. set(LLAMA_SOURCE_DIR "${WAMR_ROOT_DIR}/core/deps/llama.cpp")
  5. if(EXISTS ${LLAMA_SOURCE_DIR})
  6. message("Use existed source code under ${LLAMA_SOURCE_DIR}")
  7. FetchContent_Declare(
  8. llamacpp
  9. SOURCE_DIR ${LLAMA_SOURCE_DIR}
  10. )
  11. else()
  12. message("download source code and store it at ${LLAMA_SOURCE_DIR}")
  13. FetchContent_Declare(
  14. llamacpp
  15. GIT_REPOSITORY https://github.com/ggerganov/llama.cpp.git
  16. GIT_TAG b3573
  17. SOURCE_DIR ${LLAMA_SOURCE_DIR}
  18. )
  19. endif()
  20. set(LLAMA_BUILD_TESTS OFF)
  21. set(LLAMA_BUILD_EXAMPLES OFF)
  22. set(LLAMA_BUILD_SERVER OFF)
  23. FetchContent_MakeAvailable(llamacpp)