Skip to content

Commit bbd89c1

Browse files
committed
address comments
1 parent dc338bd commit bbd89c1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

backends/apple/coreml/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ endif()
2525

2626
option(COREML_BUILD_EXECUTOR_RUNNER "Build CoreML executor runner." OFF)
2727

28+
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)
29+
2830
# inmemoryfs sources
2931
set(INMEMORYFS_SOURCES
3032
runtime/inmemoryfs/inmemory_filesystem.cpp
@@ -223,7 +225,10 @@ if(EXECUTORCH_BUILD_COREML)
223225

224226
pybind11_add_module(executorchcoreml SHARED runtime/inmemoryfs/inmemory_filesystem_py.cpp)
225227

226-
target_compile_options(executorchcoreml PRIVATE -mmacosx-version-min=10.15 -g)
228+
target_compile_options(executorchcoreml PRIVATE -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET})
229+
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
230+
target_compile_options(executorchcoreml PRIVATE -g)
231+
endif()
227232
target_link_libraries(executorchcoreml PRIVATE coreml_util)
228233
target_link_libraries(executorchcoreml PRIVATE coreml_inmemoryfs)
229234
endif()

0 commit comments

Comments
 (0)