File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -163,12 +163,24 @@ if (LLAMA_BLAS)
163
163
if (BLAS_FOUND )
164
164
message (STATUS "BLAS found, Libraries: ${BLAS_LIBRARIES} " )
165
165
166
+ # BLAS_INCLUDE_DIRS is missing in FindBLAS.cmake.
167
+ # see https://gitlab.kitware.com/cmake/cmake/-/issues/20268
168
+ find_path (BLAS_INCLUDE_DIRS
169
+ NAMES cblas.h
170
+ HINTS
171
+ /usr/include
172
+ /usr/local/include
173
+ /usr/include/openblas
174
+ )
175
+
176
+
177
+ message (STATUS "BLAS found, Includes: ${BLAS_INCLUDE_DIRS} " )
178
+
166
179
add_compile_options (${BLAS_LINKER_FLAGS} )
167
180
add_compile_definitions (GGML_USE_OPENBLAS )
168
181
set (LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} ${BLAS_LIBRARIES} )
182
+ set (LLAMA_EXTRA_INCLUDES ${LLAMA_EXTRA_INCLUDES} ${BLAS_INCLUDE_DIRS} )
169
183
170
- message ("${BLAS_LIBRARIES} ${BLAS_INCLUDE_DIRS} " )
171
- include_directories (${BLAS_INCLUDE_DIRS} )
172
184
else ()
173
185
message (WARNING "BLAS not found, please refer to "
174
186
"https://cmake.org/cmake/help/latest/module/FindBLAS.html#blas-lapack-vendors"
@@ -408,7 +420,7 @@ add_library(ggml OBJECT
408
420
${GGML_SOURCES_EXTRA}
409
421
)
410
422
411
- target_include_directories (ggml PUBLIC . )
423
+ target_include_directories (ggml PUBLIC . ${LLAMA_EXTRA_INCLUDES} )
412
424
target_compile_features (ggml PUBLIC c_std_11 ) # don't bump
413
425
target_link_libraries (ggml PUBLIC Threads::Threads ${LLAMA_EXTRA_LIBS} )
414
426
You can’t perform that action at this time.
0 commit comments