Skip to content

Commit 4ff9736

Browse files
tarun292facebook-github-bot
authored andcommitted
Fix CMake schema generation (#685)
Summary: Pull Request resolved: #685 Reviewed By: cccclai Differential Revision: D50054053 Pulled By: tarun292 fbshipit-source-id: 101a547d8199bf093a11233ee9b9515d0fccd02e
1 parent e609982 commit 4ff9736

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

schema/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,15 @@ function(generate_program_schema _schema_srcs _schema_name)
4848
${EXECUTORCH_ROOT}/third-party/flatbuffers/include)
4949
endfunction()
5050

51-
set(program_schema_srcs program.fbs scalar_type.fbs)
51+
# Generate common schema
52+
set(common_schema_srcs scalar_type.fbs)
53+
generate_program_schema("${common_schema_srcs}" "common_schema")
54+
55+
# For the other schemas
56+
set(program_schema_srcs program.fbs)
5257
generate_program_schema("${program_schema_srcs}" "program_schema")
58+
add_dependencies(program_schema common_schema)
5359

54-
set(bundled_schema_srcs bundled_program_schema.fbs scalar_type.fbs)
60+
set(bundled_schema_srcs bundled_program_schema.fbs)
5561
generate_program_schema("${bundled_schema_srcs}" "bundled_schema")
62+
add_dependencies(bundled_schema common_schema)

0 commit comments

Comments
 (0)