Bazel to CMake: Harcode td filegroup support
This is the only type of filegroup we really use. We already don't evaluate td_srcs in the CMake gentbl rules. It's a hack, but makes bazel_to_cmake work on a bunch more files, so I think worth it.
Run bazel_to_cmake in strict mode across the repo. The only things still giving errors are a few missing targets (Vulkan and Dawn) and sh_binary, which should be easy to solve.
Depends on https://github.com/google/iree/pull/832
Closes https://github.com/google/iree/pull/835
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/835 from GMNGeoffrey:td-files-hardcode 9c444b8a4910ba0b9777567566b3933556aa2e98
PiperOrigin-RevId: 297233636
diff --git a/build_tools/bazel_to_cmake/bazel_to_cmake.py b/build_tools/bazel_to_cmake/bazel_to_cmake.py
index 2ad125f..932624d 100755
--- a/build_tools/bazel_to_cmake/bazel_to_cmake.py
+++ b/build_tools/bazel_to_cmake/bazel_to_cmake.py
@@ -299,6 +299,13 @@
# Not implemented yet. Might be a no-op, or may want to evaluate the srcs
# attribute and pass them along to any targets that depend on the filegroup.
# Cross-package dependencies and complicated globs could be hard to handle.
+
+ # We have a bunch of filegroups that just contain TD files. CMake doesn't model
+ # this at all, so we'll just hardcode this special case.
+ # TODO(gcmn): Handle this robustly
+ if (name == "td_files"):
+ return
+
self._convert_unimplemented_function("filegroup", name)
def sh_binary(self, name, **kwargs):