Files
llama.cpp/vendor/hash/CMakeLists.txt
T
Xuan-Son Nguyen 39be55c97e vendor: move hash to vendor (#27262)
* vendor: move hash to vendor

* group hashes into one single static lib
2026-08-17 18:21:02 +02:00

22 lines
499 B
CMake

set(TARGET vendor-hash)
llama_add_compile_flags()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_library(${TARGET} STATIC
xxhash/xxhash.c
sha1/sha1.c
sha256/sha256.c
)
# disable warnings in 3rd party code
if (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
target_compile_options(${TARGET} PRIVATE /w)
else()
target_compile_options(${TARGET} PRIVATE -w)
endif()
# sha256.c includes "rotate-bits/rotate-bits.h", so consumers get this dir too
target_include_directories(${TARGET} PUBLIC .)