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)
163163 if (BLAS_FOUND)
164164 message (STATUS "BLAS found, Libraries: ${BLAS_LIBRARIES} " )
165165
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+
166179 add_compile_options (${BLAS_LINKER_FLAGS} )
167180 add_compile_definitions (GGML_USE_OPENBLAS)
168181 set (LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} ${BLAS_LIBRARIES} )
182+ set (LLAMA_EXTRA_INCLUDES ${LLAMA_EXTRA_INCLUDES} ${BLAS_INCLUDE_DIRS} )
169183
170- message ("${BLAS_LIBRARIES} ${BLAS_INCLUDE_DIRS} " )
171- include_directories (${BLAS_INCLUDE_DIRS} )
172184 else ()
173185 message (WARNING "BLAS not found, please refer to "
174186 "https://cmake.org/cmake/help/latest/module/FindBLAS.html#blas-lapack-vendors"
@@ -408,7 +420,7 @@ add_library(ggml OBJECT
408420 ${GGML_SOURCES_EXTRA}
409421 )
410422
411- target_include_directories (ggml PUBLIC .)
423+ target_include_directories (ggml PUBLIC . ${LLAMA_EXTRA_INCLUDES} )
412424target_compile_features (ggml PUBLIC c_std_11) # don't bump
413425target_link_libraries (ggml PUBLIC Threads::Threads ${LLAMA_EXTRA_LIBS} )
414426
You can’t perform that action at this time.
0 commit comments