Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions schema/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ function(generate_program_schema _schema_srcs _schema_name)
foreach(fbs_file ${_schema_srcs})
string(REGEX REPLACE "[.]fbs$" "_generated.h" generated "${fbs_file}")
list(APPEND _schema_outputs
"${_program_schema__include_dir}/executorch/${generated}"
"${_program_schema__include_dir}/executorch/schema/${generated}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The underlying problem was that this path didn't match the path in the custom_command. To make it more clear that they need to agree, and to avoid mismatches in the future, consider using a common local variable for both of them, like

set(_include_dir "${_program_schema__include_dir}/executorch/schema")

and then

list(APPEND _schema_outputs "${_include_dir}/${generated}")

here and again using _include_dir on line 38.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to this, named it _program_schema__output_dir to be a little more clear.

)
endforeach()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these stray trailing whitespace characters

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, removed that.

# Generate the headers from the .fbs files.
add_custom_command(
OUTPUT ${_schema_outputs}
Expand Down
Loading