CMakeLists.txt 728 B

12345678910111213141516171819202122
  1. set(TARGET llama-gguf-hash)
  2. add_executable(${TARGET} gguf-hash.cpp)
  3. install(TARGETS ${TARGET} RUNTIME)
  4. # clibs dependencies
  5. include_directories(deps/)
  6. add_library(xxhash OBJECT deps/xxhash/xxhash.c deps/xxhash/xxhash.h)
  7. target_link_libraries(${TARGET} PRIVATE xxhash)
  8. add_library(sha1 OBJECT deps/sha1/sha1.c deps/sha1/sha1.h)
  9. target_link_libraries(${TARGET} PRIVATE sha1)
  10. if (NOT MSVC)
  11. # disable warnings in 3rd party code
  12. target_compile_options(sha1 PRIVATE -w)
  13. endif()
  14. add_library(sha256 OBJECT deps/sha256/sha256.c deps/sha256/sha256.h)
  15. target_link_libraries(${TARGET} PRIVATE sha256)
  16. target_link_libraries(${TARGET} PRIVATE ggml ${CMAKE_THREAD_LIBS_INIT})
  17. target_compile_features(${TARGET} PRIVATE cxx_std_17)