Skip to content

Commit 09a4b9d

Browse files
authored
Resolve buck earlier (#11451)
### Summary Since we resolve buck2 later on, it results in the value of buck2 being empty. It now shows the location: ### Test plan ``` $ cmake --preset pybind && cmake --build cmake-out -j $(sysctl -n hw.ncpu) -- --- Configured Options --- -- CMAKE_CXX_STANDARD : 17 -- CMAKE_SYSTEM_PROCESSOR : arm64 -- CMAKE_BUILD_TYPE : Debug -- PYTHON_EXECUTABLE : /Users/jathu/executorch/.venv/bin/python3 -- BUCK2 : /Users/jathu/executorch/buck2-bin/buck2-2025-05-06-201beb86106fecdc84e30260b0f1abb5bf576988 ``` cc @larryliu0820
1 parent fbe2e58 commit 09a4b9d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,13 @@ if(NOT PYTHON_EXECUTABLE)
7575
endif()
7676
announce_configured_options(PYTHON_EXECUTABLE)
7777

78+
if(NOT BUCK2)
79+
resolve_buck2()
80+
endif()
81+
announce_configured_options(BUCK2)
82+
7883
announce_configured_options(CMAKE_CXX_COMPILER_ID)
7984
announce_configured_options(CMAKE_TOOLCHAIN_FILE)
80-
announce_configured_options(BUCK2)
8185

8286
load_build_preset()
8387
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/default.cmake)
@@ -290,9 +294,6 @@ set(_common_include_directories
290294
#
291295

292296
if(NOT EXECUTORCH_SRCS_FILE)
293-
# Find or download buck2 binary.
294-
resolve_buck2()
295-
296297
# A file wasn't provided. Run a script to extract the source lists from the
297298
# buck2 build system and write them to a file we can include.
298299
#

0 commit comments

Comments
 (0)