Skip to content

Commit ecb0042

Browse files
fix flatcc build issue
1 parent 5d10dfa commit ecb0042

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

backends/xnnpack/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,6 @@ endforeach()
7474

7575
# Generate the headers from the .fbs files.
7676

77-
if(WIN32)
78-
set(MOVE_COMMAND move)
79-
else()
80-
set(MOVE_COMMAND mv)
81-
endif()
82-
83-
8477
if (WIN32)
8578
add_custom_command(
8679
OUTPUT ${_xnnpack_schema__outputs}

devtools/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,13 @@ file(MAKE_DIRECTORY
157157
${_program_schema__include_dir}/executorch/devtools/bundled_program
158158
)
159159

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

166169
if(WIN32)
@@ -170,7 +173,7 @@ if(WIN32)
170173
# Note that the flatcc project actually writes its outputs into the source
171174
# tree instead of under the binary directory, and there's no way to change
172175
# that behavior.
173-
${_flatcc_source_dir}/bin/flatcc -cwr -o
176+
${_flatcc_bin_path} -cwr -o
174177
${_program_schema__include_dir}/executorch/devtools/etdump
175178
${_etdump_schema__srcs}
176179
# COMMAND powershell -Command "Remove-Item -Path " ${_etdump_schema_cleanup_paths} " -Force -ErrorAction SilentlyContinue"
@@ -185,7 +188,7 @@ add_custom_command(
185188
# Note that the flatcc project actually writes its outputs into the source
186189
# tree instead of under the binary directory, and there's no way to change
187190
# that behavior.
188-
${_flatcc_source_dir}/bin/flatcc -cwr -o
191+
${_flatcc_bin_path} -cwr -o
189192
${_program_schema__include_dir}/executorch/devtools/etdump
190193
${_etdump_schema__srcs}
191194
COMMAND rm -f ${_etdump_schema_cleanup_paths}

0 commit comments

Comments
 (0)