File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ get_filename_component(
2424)
2525
2626# We only download QNN SDK when we build pip wheel for ExecuTorch.
27- if (EXECUTORCH_BUILD_PYBIND )
27+ if (EXECUTORCH_BUILD_WHEEL_DEV_USE_ONLY )
2828 set (_qnn_default_sdk_dir "${CMAKE_CURRENT_BINARY_DIR} /sdk/qnn" )
2929
3030 if (EXISTS "${_qnn_default_sdk_dir} " AND EXISTS "${_qnn_default_sdk_dir} /lib" )
Original file line number Diff line number Diff line change @@ -676,6 +676,8 @@ def run(self): # noqa C901
676676 # like `TorchConfig.cmake` that are provided by pip packages.
677677 f"-DCMAKE_PREFIX_PATH={ cmake_prefix_path } " ,
678678 f"-DCMAKE_BUILD_TYPE={ cmake_build_type } " ,
679+ # Turn on the wheel building option for downstream CMakeLists.txt.
680+ f"-DEXECUTORCH_BUILD_WHEEL_DEV_USE_ONLY=ON" ,
679681 ]
680682
681683 # Use ClangCL on Windows.
Original file line number Diff line number Diff line change @@ -288,6 +288,12 @@ define_overridable_option(
288288 BOOL
289289 FALSE
290290)
291+ define_overridable_option(
292+ EXECUTORCH_BUILD_WHEEL_DEV_USE_ONLY
293+ "On if in the wheel building process. Should only be used to guard code that is only needed for building the wheel."
294+ BOOL
295+ FALSE
296+ )
291297
292298# ------------------------------------------------------------------------------
293299# Validations
You can’t perform that action at this time.
0 commit comments