@@ -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.
160163if (WIN32 )
161- set (REMOVE_COMMAND "del /F /Q" )
164+ set (_flatcc_bin_path ${_flatcc_source_dir} /bin/ ${CMAKE_BUILD_TYPE} /flatcc )
162165else ()
163- set (REMOVE_COMMAND "rm -f" )
166+ set (_flatcc_bin_path ${_flatcc_source_dir} /bin/flatcc )
164167endif ()
165168
166169if (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