Skip to content
Merged
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
32 changes: 24 additions & 8 deletions extension/apple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,34 @@ endif()

add_library(extension_apple)

file(GLOB EXPORTED_SOURCES ExecuTorch/Exported/*.m ExecuTorch/Exported/*.mm)
file(GLOB EXPORTED_SOURCES
ExecuTorch/Exported/*.m
ExecuTorch/Exported/*.mm
)

file(GLOB INTERNAL_SOURCES
ExecuTorch/Internal/*.m
ExecuTorch/Internal/*.mm
)

target_sources(extension_apple PRIVATE ${EXPORTED_SOURCES})
target_sources(extension_apple PRIVATE
${EXPORTED_SOURCES}
${INTERNAL_SOURCES}
)

target_include_directories(extension_apple PUBLIC ExecuTorch/Exported)
target_include_directories(extension_apple
PUBLIC ExecuTorch/Exported
PRIVATE ExecuTorch/Internal
)

find_library(FOUNDATION_FRAMEWORK Foundation)
target_link_libraries(
extension_apple PRIVATE executorch ${FOUNDATION_FRAMEWORK}
target_link_libraries(extension_apple
PRIVATE executorch ${FOUNDATION_FRAMEWORK}
)

target_compile_options(extension_apple PUBLIC ${_common_compile_options})
target_compile_options(extension_apple PRIVATE "-fobjc-arc")
target_compile_options(extension_apple PRIVATE "-fno-exceptions")
target_compile_options(extension_apple PRIVATE "-fno-rtti")
target_compile_options(extension_apple PRIVATE
"-fobjc-arc"
"-fno-exceptions"
"-fno-rtti"
)
9 changes: 9 additions & 0 deletions extension/apple/ExecuTorch/Internal/ExecuTorchUtils.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/

#import <Foundation/Foundation.h>
Loading