Skip to content
Closed
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
fix flatcc build issue
  • Loading branch information
chinazhangchao committed Nov 29, 2024
commit ecb00425456f7c123aac11539610a896cf18613a
7 changes: 0 additions & 7 deletions backends/xnnpack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ endforeach()

# Generate the headers from the .fbs files.

if(WIN32)
set(MOVE_COMMAND move)
else()
set(MOVE_COMMAND mv)
endif()


if (WIN32)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this looks fine to me, i'm assuming this has to be done for every flatbuffer outputted header file

Copy link
Copy Markdown
Author

@vortex-captain vortex-captain Dec 6, 2024

Choose a reason for hiding this comment

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

this looks fine to me, i'm assuming this has to be done for every flatbuffer outputted header file

Thanks for the review! As suggested, we will split into smaller PRs (#7217), and apply these "platform-dependent shell command" changes everywhere in a later PR

add_custom_command(
OUTPUT ${_xnnpack_schema__outputs}
Expand Down
11 changes: 7 additions & 4 deletions devtools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,13 @@ file(MAKE_DIRECTORY
${_program_schema__include_dir}/executorch/devtools/bundled_program
)

# Note that the flatcc project actually writes its outputs into the source
# tree instead of under the binary directory, and there's no way to change
# that behavior.
if(WIN32)
set(REMOVE_COMMAND "del /F /Q")
set(_flatcc_bin_path ${_flatcc_source_dir}/bin/${CMAKE_BUILD_TYPE}/flatcc)
else()
set(REMOVE_COMMAND "rm -f")
set(_flatcc_bin_path ${_flatcc_source_dir}/bin/flatcc)
endif()

if(WIN32)
Expand All @@ -170,7 +173,7 @@ if(WIN32)
# Note that the flatcc project actually writes its outputs into the source
# tree instead of under the binary directory, and there's no way to change
# that behavior.
${_flatcc_source_dir}/bin/flatcc -cwr -o
${_flatcc_bin_path} -cwr -o
${_program_schema__include_dir}/executorch/devtools/etdump
${_etdump_schema__srcs}
# COMMAND powershell -Command "Remove-Item -Path " ${_etdump_schema_cleanup_paths} " -Force -ErrorAction SilentlyContinue"
Expand All @@ -185,7 +188,7 @@ add_custom_command(
# Note that the flatcc project actually writes its outputs into the source
# tree instead of under the binary directory, and there's no way to change
# that behavior.
${_flatcc_source_dir}/bin/flatcc -cwr -o
${_flatcc_bin_path} -cwr -o
${_program_schema__include_dir}/executorch/devtools/etdump
${_etdump_schema__srcs}
COMMAND rm -f ${_etdump_schema_cleanup_paths}
Expand Down