From 6cbdabe124f10e655ca3954d54a59cfb4475a393 Mon Sep 17 00:00:00 2001 From: l3utterfly Date: Fri, 10 May 2024 20:12:36 +0900 Subject: [PATCH] use shared openblas library --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b802edd3194ba..c5b035de3812c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -305,10 +305,11 @@ if (LLAMA_BLAS) add_compile_definitions(GGML_USE_OPENBLAS) - add_subdirectory(../OpenBLAS ${CMAKE_CURRENT_BINARY_DIR}/OpenBLAS) + set(LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} openblas) - set(LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} openblas_shared) - set(LLAMA_EXTRA_INCLUDES ${LLAMA_EXTRA_INCLUDES} ../OpenBLAS ${CMAKE_CURRENT_BINARY_DIR}/OpenBLAS) + # we need to add the shared openblas library we built in our over-arching project + # this directory includes the "config.h" file generated by OpenBLAS + set(LLAMA_EXTRA_INCLUDES ${LLAMA_EXTRA_INCLUDES} ../OpenBLAS ${CMAKE_CURRENT_BINARY_DIR}/../../openblas) endif() if (LLAMA_LLAMAFILE)