Skip to content

Commit 32d0b14

Browse files
Added common variable for schema output directory and removed accidental whitespace.
1 parent a85610a commit 32d0b14

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

schema/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ endif()
1515

1616
# The include directory that will contain the generated schema headers.
1717
set(_program_schema__include_dir "${CMAKE_BINARY_DIR}/schema/include")
18-
18+
set(_program_schema__output_dir "${_program_schema__include_dir}/executorch/schema")
1919
# Source root directory for executorch.
2020
if(NOT EXECUTORCH_ROOT)
2121
set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/..)
@@ -26,16 +26,16 @@ function(generate_program_schema _schema_srcs _schema_name)
2626
foreach(fbs_file ${_schema_srcs})
2727
string(REGEX REPLACE "[.]fbs$" "_generated.h" generated "${fbs_file}")
2828
list(APPEND _schema_outputs
29-
"${_program_schema__include_dir}/executorch/schema/${generated}"
29+
"${_program_schema__output_dir}/${generated}"
3030
)
3131
endforeach()
32-
32+
3333
# Generate the headers from the .fbs files.
3434
add_custom_command(
3535
OUTPUT ${_schema_outputs}
3636
COMMAND
3737
${FLATC_EXECUTABLE} --cpp --cpp-std c++11 --gen-mutable --scoped-enums -o
38-
"${_program_schema__include_dir}/executorch/schema" ${_schema_srcs}
38+
"${_program_schema__output_dir}" ${_schema_srcs}
3939
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
4040
DEPENDS ${FLATC_EXECUTABLE} ${_schema_srcs}
4141
COMMENT "Generating ${_schema_name} headers"

0 commit comments

Comments
 (0)