Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions backends/apple/coreml/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ runtime.cxx_library(
"-Wno-receiver-expr",
"-Wno-error",
],
preprocessor_flags = [
"-DJSON_NOEXCEPTION",
],
define_static_target = True,
header_namespace = "backends/apple/coreml",
exported_headers = ["runtime/delegate/executorch_operations.h", "runtime/include/coreml_backend/delegate.h"],
Expand All @@ -89,6 +92,7 @@ runtime.cxx_library(
platforms = [APPLE],
visibility = ["PUBLIC"],
deps = [
"fbsource//third-party/nlohmann-json:nlohmann-json",
"//executorch/runtime/backend:interface",
"//executorch/runtime/core:core",
"//executorch/runtime/kernel:kernel_includes",
Expand Down
8 changes: 8 additions & 0 deletions backends/apple/coreml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@ if(APPLE)
target_link_libraries(coremldelegate PRIVATE libprotobuf-lite)
endif()

# Add nlohmann_json include directory (header-only library) Define
# JSON_NOEXCEPTION since coremldelegate is compiled with -fno-exceptions
target_include_directories(
coremldelegate
PRIVATE ${PROJECT_SOURCE_DIR}/third-party/json/single_include
)
target_compile_definitions(coremldelegate PRIVATE JSON_NOEXCEPTION)

target_link_libraries(
coremldelegate
PUBLIC coreml_util coreml_inmemoryfs
Expand Down
Loading
Loading