@@ -75,9 +75,13 @@ if(NOT PYTHON_EXECUTABLE)
7575endif ()
7676announce_configured_options(PYTHON_EXECUTABLE)
7777
78+ if (NOT  BUCK2)
79+   resolve_buck2()
80+ endif ()
81+ announce_configured_options(BUCK2)
82+ 
7883announce_configured_options(CMAKE_CXX_COMPILER_ID)
7984announce_configured_options(CMAKE_TOOLCHAIN_FILE)
80- announce_configured_options(BUCK2)
8185
8286load_build_preset()
8387include (${PROJECT_SOURCE_DIR} /tools/cmake/preset/default.cmake)
@@ -148,37 +152,11 @@ else()
148152endif ()
149153
150154if (EXECUTORCH_BUILD_TESTS)
151-   set (EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON )
152155  include (CTest)
153156endif ()
154157
155158add_subdirectory (third-party)
156159
157- if (EXECUTORCH_BUILD_EXTENSION_TRAINING)
158-   set (EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON )
159-   set (EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON )
160-   set (EXECUTORCH_BUILD_EXTENSION_MODULE ON )
161-   set (EXECUTORCH_BUILD_EXTENSION_TENSOR ON )
162- endif ()
163- 
164- if (EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR)
165-   set (EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON )
166- endif ()
167- 
168- if (EXECUTORCH_BUILD_EXTENSION_MODULE)
169-   set (EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON )
170-   set (EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON )
171- endif ()
172- 
173- if (EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT)
174-   set (EXECUTORCH_BUILD_EXTENSION_TENSOR ON )
175-   set (EXECUTORCH_BUILD_KERNELS_CUSTOM ON )
176- endif ()
177- 
178- if (EXECUTORCH_BUILD_KERNELS_CUSTOM)
179-   set (EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON )
180- endif ()
181- 
182160if (NOT  DEFINED  FXDIV_SOURCE_DIR)
183161  set (ORIGINAL_CMAKE_POSITION_INDEPENDENT_CODE_FLAG
184162      ${CMAKE_POSITION_INDEPENDENT_CODE} 
@@ -290,9 +268,6 @@ set(_common_include_directories
290268# 
291269
292270if (NOT  EXECUTORCH_SRCS_FILE)
293-   # Find or download buck2 binary. 
294-   resolve_buck2()
295- 
296271  # A file wasn't provided. Run a script to extract the source lists from the 
297272  # buck2 build system and write them to a file we can include. 
298273  # 
@@ -335,7 +310,7 @@ if(EXECUTORCH_USE_CPP_CODE_COVERAGE)
335310           " -fprofile-instr-generate -fcoverage-mapping" 
336311    )
337312  else ()
338-     message (ERROR 
313+     message (FATAL_ERROR 
339314            "Code coverage for compiler ${CMAKE_CXX_COMPILER_ID}  is unsupported" 
340315    )
341316  endif ()
0 commit comments