CMake: properly find and link to threading library
This commit is contained in:
parent
47857e564c
commit
279400845b
1 changed files with 7 additions and 2 deletions
|
@ -41,6 +41,11 @@ if (NOT MSVC)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
include(FindThreads)
|
||||
if (NOT Threads_FOUND)
|
||||
message(FATAL_ERROR "Threading library is not found")
|
||||
endif()
|
||||
|
||||
if (APPLE AND NOT LLAMA_NO_ACCELERATE)
|
||||
find_library(ACCELERATE_FRAMEWORK Accelerate)
|
||||
if (ACCELERATE_FRAMEWORK)
|
||||
|
@ -124,5 +129,5 @@ target_compile_definitions(quantize PUBLIC ${LLAMA_EXTRA_FLAGS})
|
|||
|
||||
target_link_libraries(ggml PRIVATE ${LLAMA_EXTRA_LIBS})
|
||||
target_include_directories(ggml PUBLIC .)
|
||||
target_link_libraries(quantize PRIVATE ggml)
|
||||
target_link_libraries(llama PRIVATE ggml)
|
||||
target_link_libraries(quantize PRIVATE ggml Threads::Threads)
|
||||
target_link_libraries(llama PRIVATE ggml Threads::Threads)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue