2024-07-07 12:58:43 +00:00
|
|
|
set(TARGET llama-gguf-hash)
|
|
|
|
add_executable(${TARGET} gguf-hash.cpp)
|
|
|
|
install(TARGETS ${TARGET} RUNTIME)
|
|
|
|
|
|
|
|
# clibs dependencies
|
|
|
|
include_directories(deps/)
|
2024-11-26 20:01:47 +00:00
|
|
|
|
2024-07-07 12:58:43 +00:00
|
|
|
add_library(xxhash OBJECT deps/xxhash/xxhash.c deps/xxhash/xxhash.h)
|
|
|
|
target_link_libraries(${TARGET} PRIVATE xxhash)
|
2024-11-26 20:01:47 +00:00
|
|
|
|
2024-07-07 12:58:43 +00:00
|
|
|
add_library(sha1 OBJECT deps/sha1/sha1.c deps/sha1/sha1.h)
|
|
|
|
target_link_libraries(${TARGET} PRIVATE sha1)
|
2024-11-26 20:01:47 +00:00
|
|
|
if (NOT MSVC)
|
|
|
|
# disable warnings in 3rd party code
|
|
|
|
target_compile_options(sha1 PRIVATE -w)
|
|
|
|
endif()
|
|
|
|
|
2024-07-07 12:58:43 +00:00
|
|
|
add_library(sha256 OBJECT deps/sha256/sha256.c deps/sha256/sha256.h)
|
|
|
|
target_link_libraries(${TARGET} PRIVATE sha256)
|
|
|
|
|
|
|
|
target_link_libraries(${TARGET} PRIVATE ggml ${CMAKE_THREAD_LIBS_INIT})
|
2024-11-29 20:54:58 +00:00
|
|
|
target_compile_features(${TARGET} PRIVATE cxx_std_17)
|