Skip to content

Commit 51db486

Browse files
committed
blas build: use LDFLAGS from pkg-config
1 parent d2fe216 commit 51db486

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ggml/src/ggml-blas/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ if (BLAS_FOUND)
5454
endif()
5555
if (DepBLAS_FOUND)
5656
set(BLAS_INCLUDE_DIRS ${DepBLAS_INCLUDE_DIRS})
57+
set(BLAS_LDFLAGS ${DepBLAS_LDFLAGS})
5758
else()
5859
message(WARNING "BLAS_INCLUDE_DIRS neither been provided nor been automatically"
5960
" detected by pkgconfig, trying to find cblas.h from possible paths...")
@@ -73,6 +74,7 @@ if (BLAS_FOUND)
7374
message(STATUS "BLAS found, Includes: ${BLAS_INCLUDE_DIRS}")
7475

7576
target_compile_options(ggml-blas PRIVATE ${BLAS_LINKER_FLAGS})
77+
target_link_options(ggml-blas PRIVATE ${BLAS_LDFLAGS})
7678

7779
if (${BLAS_INCLUDE_DIRS} MATCHES "mkl" AND (${GGML_BLAS_VENDOR} MATCHES "Generic" OR ${GGML_BLAS_VENDOR} MATCHES "Intel"))
7880
add_compile_definitions(GGML_BLAS_USE_MKL)

0 commit comments

Comments
 (0)