Add gmock dependency to gtest shim This makes it possible to build a library that depends on this target (otherwise it can't find the gmock header). At least a partial fix for https://github.com/google/iree/issues/951 Tested: https://github.com/google/iree/pull/950 (use this in a library) with this commit patched in now builds Closes https://github.com/google/iree/pull/953 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/953 from GMNGeoffrey:gmock-dep 48e1e98990a43614bf7ef7bebf1075b3f7230067 PiperOrigin-RevId: 298920561
diff --git a/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py b/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py index cd5c12a..1cf2284 100644 --- a/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py +++ b/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
@@ -70,7 +70,7 @@ # Misc single targets "@com_google_benchmark//:benchmark": ["benchmark"], "@com_github_google_flatbuffers//:flatbuffers": ["flatbuffers"], - "@com_google_googletest//:gtest": ["gtest"], + "@com_google_googletest//:gtest": ["gmock", "gtest"], "@renderdoc_api//:renderdoc_app": ["renderdoc_api::renderdoc_app"], "@sdl2//:SDL2": ["SDL2-static"] }
diff --git a/iree/testing/internal/CMakeLists.txt b/iree/testing/internal/CMakeLists.txt index 75f5126..07362c1 100644 --- a/iree/testing/internal/CMakeLists.txt +++ b/iree/testing/internal/CMakeLists.txt
@@ -18,6 +18,7 @@ HDRS "gtest_internal.h" DEPS + gmock gtest TESTONLY PUBLIC @@ -31,6 +32,7 @@ SRCS "gtest_main_internal.cc" DEPS + gmock gtest iree::base::init TESTONLY