@@ -410,20 +410,6 @@ endif()
410410message (STATUS "executorch: Using sources file ${EXECUTORCH_SRCS_FILE} " )
411411include (${EXECUTORCH_SRCS_FILE} )
412412
413- #
414- # Modify default options when cross-compiling.
415- #
416- # The intent is for the EXECUTORCH_BUILD_HOST_TARGETS option to affect the
417- # default ON/OFF values of host targets around the tree. This way, a user can
418- # disable EXECUTORCH_BUILD_HOST_TARGETS to disable all host targets, and then
419- # optionally re-enable some of those targets. Or they could leave
420- # EXECUTORCH_BUILD_HOST_TARGETS enabled and then optionally disable any given
421- # host target.
422- #
423- # We can then use various cross-compilation hints to set the default value of
424- # EXECUTORCH_BUILD_HOST_TARGETS, which can still be overridden if desired.
425- #
426-
427413# Detect if an iOS toolchain is set.
428414if (CMAKE_TOOLCHAIN_FILE MATCHES ".*(iOS|ios\. toolchain)\. cmake$" )
429415 set (CMAKE_TOOLCHAIN_IOS ON )
@@ -458,16 +444,6 @@ if(EXECUTORCH_USE_CPP_CODE_COVERAGE)
458444 endif ()
459445endif ()
460446
461- # EXECUTORCH_BUILD_HOST_TARGETS: Option to control the building of host-only
462- # tools like `flatc`, along with example executables like `executor_runner` and
463- # libraries that it uses, like `gflags`. Disabling this can be helpful when
464- # cross-compiling, but some required tools that would have been built need to be
465- # provided directly.
466- cmake_dependent_option(
467- EXECUTORCH_BUILD_HOST_TARGETS "Build host-only targets." ON
468- "NOT CMAKE_TOOLCHAIN_IOS" OFF
469- )
470-
471447#
472448# flatc: Flatbuffer commandline tool to generate .h files from .fbs files
473449#
@@ -665,10 +641,7 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/configurations)
665641#
666642# gflags: Commandline flag host library.
667643#
668- cmake_dependent_option(
669- EXECUTORCH_BUILD_GFLAGS "Build the gflags library." ON
670- EXECUTORCH_BUILD_HOST_TARGETS OFF
671- )
644+ option (EXECUTORCH_BUILD_GFLAGS "Build the gflags library." ON )
672645if (EXECUTORCH_BUILD_GFLAGS)
673646 add_subdirectory (third-party/gflags)
674647endif ()
@@ -692,10 +665,7 @@ install(FILES tools/cmake/executorch-config.cmake DESTINATION lib/cmake/ExecuTor
692665#
693666# executor_runner: Host tool that demonstrates program execution.
694667#
695- cmake_dependent_option(
696- EXECUTORCH_BUILD_EXECUTOR_RUNNER "Build the executor_runner executable" ON
697- EXECUTORCH_BUILD_HOST_TARGETS OFF
698- )
668+ option (EXECUTORCH_BUILD_EXECUTOR_RUNNER "Build the executor_runner executable" ON )
699669
700670# Add googletest if any test targets should be built
701671if (BUILD_TESTING)
0 commit comments