Correct the build for the ninja generator (#7158)
### Summary The devtools build fails when run with ninja multi-config generator. The problem comes from the generated command that contains `rm -f` for the bid dir that in case of using ninja generator will contain several directories ``` FAILED: devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_reader.h devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_builder.h devtools/include/executorch/devtools/etdump/scalar_type_reader.h devtools/include/executorch/devtools/etdump/scalar_type_builder.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_reader.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/etdump_schema_flatcc_builder.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/scalar_type_reader.h /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump/scalar_type_builder.h cd /Volumes/workplace/sample-project/build/default/vendor/executorch/devtools && /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/flatcc -cwr -o /Volumes/workplace/sample-project/build/default/devtools/include/executorch/devtools/etdump /Volumes/workplace/sample-project/vendor/executorch/devtools/etdump/etdump_schema_flatcc.fbs /Volumes/workplace/sample-project/vendor/executorch/devtools/etdump/scalar_type.fbs && rm -f /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/* /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/* rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/Debug: is a directory rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/RelWithDebInfo: is a directory rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/Release: is a directory rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/Debug: is a directory rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/RelWithDebInfo: is a directory rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/lib/Release: is a directory ``` Note the lines ``` rm: /Volumes/workplace/sample-project/vendor/executorch/devtools/../third-party/flatcc/bin/Debug: is a directory ``` ### Test plan The CI will show the compatibility with the existing cmake intergations. The way to check it works for ninja ``` cmake -S . -B build -G "Ninja Multi-Config" -DEXECUTORCH_BUILD_DEVTOOLS=ON cmake --build build --config Release ```
Y
Yuri Khrustalev committed
2dc9043e905525aed875173506d2d16aa78e284d
Parent: 5635672
Committed by GitHub <noreply@github.com>
on 12/4/2024, 12:11:14 AM