mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-25 01:41:17 +08:00
Merge d2e0b0465c
into c8b4787e4e
This commit is contained in:
commit
8f58ee4348
@ -42,6 +42,7 @@ option(MLX_BUILD_SAFETENSORS "Include support for safetensors format" ON)
|
|||||||
option(MLX_BUILD_BLAS_FROM_SOURCE "Build OpenBLAS from source code" OFF)
|
option(MLX_BUILD_BLAS_FROM_SOURCE "Build OpenBLAS from source code" OFF)
|
||||||
option(MLX_METAL_JIT "Use JIT compilation for Metal kernels" OFF)
|
option(MLX_METAL_JIT "Use JIT compilation for Metal kernels" OFF)
|
||||||
option(BUILD_SHARED_LIBS "Build mlx as a shared library" OFF)
|
option(BUILD_SHARED_LIBS "Build mlx as a shared library" OFF)
|
||||||
|
option(USE_SYSTEM_FMT "Use system's provided fmt library" OFF)
|
||||||
|
|
||||||
# --------------------- Processor tests -------------------------
|
# --------------------- Processor tests -------------------------
|
||||||
message(
|
message(
|
||||||
@ -234,12 +235,16 @@ target_include_directories(
|
|||||||
# Do not add mlx_EXPORTS define for shared library.
|
# Do not add mlx_EXPORTS define for shared library.
|
||||||
set_target_properties(mlx PROPERTIES DEFINE_SYMBOL "")
|
set_target_properties(mlx PROPERTIES DEFINE_SYMBOL "")
|
||||||
|
|
||||||
FetchContent_Declare(
|
if(USE_SYSTEM_FMT)
|
||||||
fmt
|
find_package(fmt REQUIRED)
|
||||||
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
|
else()
|
||||||
GIT_TAG 10.2.1
|
FetchContent_Declare(
|
||||||
EXCLUDE_FROM_ALL)
|
fmt
|
||||||
FetchContent_MakeAvailable(fmt)
|
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
|
||||||
|
GIT_TAG 10.2.1
|
||||||
|
EXCLUDE_FROM_ALL)
|
||||||
|
FetchContent_MakeAvailable(fmt)
|
||||||
|
endif()
|
||||||
target_link_libraries(mlx PRIVATE $<BUILD_INTERFACE:fmt::fmt-header-only>)
|
target_link_libraries(mlx PRIVATE $<BUILD_INTERFACE:fmt::fmt-header-only>)
|
||||||
|
|
||||||
if(MLX_BUILD_PYTHON_BINDINGS)
|
if(MLX_BUILD_PYTHON_BINDINGS)
|
||||||
|
Loading…
Reference in New Issue
Block a user