Skip to content

Commit 36e327b

Browse files
shoumikhinfacebook-github-bot
authored andcommitted
Amend toolchain file matching in CMakeLists to avoid building executables for iOS.
Summary: . Differential Revision: D49864956
1 parent 84b333d commit 36e327b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ include(${EXECUTORCH_SRCS_FILE})
162162
# _default_build_host_targets: The default value for the
163163
# EXECUTORCH_BUILD_HOST_TARGETS option.
164164
set(_default_build_host_targets ON)
165-
if(CMAKE_TOOLCHAIN_FILE MATCHES ".*ios\.toolchain\.cmake$")
165+
if(CMAKE_TOOLCHAIN_FILE MATCHES ".*iOS\.cmake$")
166166
# TODO(dbort): Refactor toolchain-specific matching. Ideally this file would
167167
# not know about specific targets, and work with more abstract concepts like
168168
# "is cross compiling".

backends/xnnpack/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ target_link_options_shared_lib(xnnpack_backend)
9191
list(APPEND xnn_executor_runner_libs xnnpack_backend)
9292

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

0 commit comments

Comments
 (0)