Skip to content

Commit 52b45e2

Browse files
authored
create and validate build_variables.bzl (#8326)
First step of #8268 -- we are moving from buck-extracted filelist to using one shared filelist, and the first step is to create the shared filelist and validate it against the buck generation. Differential Revision: [D80187441](https://our.internmc.facebook.com/intern/diff/D80187441)
1 parent 657876d commit 52b45e2

File tree

3 files changed

+661
-2
lines changed

3 files changed

+661
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@
5050
cmake_minimum_required(VERSION 3.29)
5151
project(executorch)
5252

53+
set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
54+
5355
include(${PROJECT_SOURCE_DIR}/tools/cmake/common/preset.cmake)
56+
include(${PROJECT_SOURCE_DIR}/tools/cmake/Codegen.cmake)
5457
include(${PROJECT_SOURCE_DIR}/tools/cmake/Utils.cmake)
5558
include(CMakeDependentOption)
5659
include(ExternalProject)
@@ -123,8 +126,6 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
123126
# Instead please use `find_package(executorch REQUIRED)` in the example
124127
# directory and add a new executable in the example `CMakeLists.txt`.
125128

126-
set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
127-
128129
if(NOT EXECUTORCH_ENABLE_LOGGING)
129130
# Avoid pulling in the logging strings, which can be large. Note that this
130131
# will set the compiler flag for all targets in this directory, and for all
@@ -320,6 +321,7 @@ if(NOT EXECUTORCH_SRCS_FILE)
320321
message(STATUS "executorch: Generating source lists")
321322
set(EXECUTORCH_SRCS_FILE "${CMAKE_CURRENT_BINARY_DIR}/executorch_srcs.cmake")
322323
extract_sources(${EXECUTORCH_SRCS_FILE})
324+
executorch_validate_build_variables()
323325
endif()
324326

325327
# This file defines the `_<target>__srcs` variables used below.

0 commit comments

Comments
 (0)