mirror of
https://github.com/ml-explore/mlx.git
synced 2025-08-21 12:06:42 +08:00
fetch json
This commit is contained in:
parent
c043d27682
commit
3f82fe8888
@ -99,8 +99,17 @@ elseif (MLX_BUILD_METAL)
|
||||
endif()
|
||||
|
||||
MESSAGE(STATUS "Downloading json")
|
||||
find_package(nlohmann_json 3.11.3 REQUIRED)
|
||||
target_link_libraries(mlx nlohmann_json::nlohmann_json)
|
||||
FetchContent_Declare(
|
||||
json
|
||||
GIT_REPOSITORY "https://github.com/nlohmann/json"
|
||||
GIT_TAG "v3.11.3"
|
||||
)
|
||||
FetchContent_MakeAvailable(json)
|
||||
target_include_directories(
|
||||
mlx PUBLIC
|
||||
$<BUILD_INTERFACE:${json_SOURCE_DIR}/single_include/nlohmann>
|
||||
$<INSTALL_INTERFACE:include/json>
|
||||
)
|
||||
|
||||
find_library(ACCELERATE_LIBRARY Accelerate)
|
||||
if (MLX_BUILD_ARM AND ACCELERATE_LIBRARY)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <json.hpp>
|
||||
|
||||
#include "mlx/load.h"
|
||||
#include "mlx/ops.h"
|
||||
@ -25,4 +25,4 @@ namespace mlx::core {
|
||||
#define ST_U16 "U16"
|
||||
#define ST_U32 "U32"
|
||||
#define ST_U64 "U64"
|
||||
} // namespace mlx::core
|
||||
} // namespace mlx::core
|
||||
|
Loading…
Reference in New Issue
Block a user