Skip to content

Amend toolchain file matching in CMakeLists to avoid building executables for iOS. #583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ include(${EXECUTORCH_SRCS_FILE})
# _default_build_host_targets: The default value for the
# EXECUTORCH_BUILD_HOST_TARGETS option.
set(_default_build_host_targets ON)
if(CMAKE_TOOLCHAIN_FILE MATCHES ".*ios\.toolchain\.cmake$")
if(CMAKE_TOOLCHAIN_FILE MATCHES ".*iOS\.cmake$")
# TODO(dbort): Refactor toolchain-specific matching. Ideally this file would
# not know about specific targets, and work with more abstract concepts like
# "is cross compiling".
Expand Down
2 changes: 1 addition & 1 deletion backends/xnnpack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ target_link_options_shared_lib(xnnpack_backend)
list(APPEND xnn_executor_runner_libs xnnpack_backend)

# ios can only build library but not binary
if(NOT CMAKE_TOOLCHAIN_FILE MATCHES ".*ios\.toolchain\.cmake$")
if(NOT CMAKE_TOOLCHAIN_FILE MATCHES ".*iOS\.cmake$")
#
# xnn_executor_runner: Like executor_runner but with XNNPACK, the binary will
# be at ${CMAKE_BINARY_DIR}/backends/xnnpack
Expand Down