Skip to content

Commit

Permalink
Link with openblas statically
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Dec 10, 2024
1 parent d9a302b commit 5eaa3b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ if(MLX_BUILD_CPU)
GIT_REPOSITORY https://github.com/OpenMathLib/OpenBLAS.git
GIT_TAG v0.3.28
EXCLUDE_FROM_ALL)
set(NOFORTRAN ON) # msvc has no fortran compiler
set(BUILD_STATIC_LIBS ON) # link statically
set(NOFORTRAN ON) # msvc has no fortran compiler
FetchContent_MakeAvailable(openblas)
target_link_libraries(mlx PRIVATE openblas)
target_include_directories(
mlx PRIVATE "${openblas_SOURCE_DIR}/lapack-netlib/LAPACKE/include"
"${CMAKE_BINARY_DIR}/generated"
"${CMAKE_BINARY_DIR}")
"${CMAKE_BINARY_DIR}/generated" "${CMAKE_BINARY_DIR}")
else()
if(${CMAKE_HOST_APPLE})
# The blas shipped in macOS SDK is not supported, search homebrew for
Expand Down

0 comments on commit 5eaa3b1

Please sign in to comment.