external gtest dependency importing (cmake)
Open
enhancement
- Dominant language
- C++
- Stars
- 1.8k
- Forks
- 200
- Avg merge
- 12d 2h
- Merged PRs (30d)
- 1
Description
CMake expects the targets `gtest` `gtest_main` `gmock` (at `cmake/SapiDeps.cmake:48`, while externally installed googletest usually exposes these under the `GTest` namespace, eg as `GTest::gtest` instead.
Relatedly, `set(ABSL_FIND_GOOGLETEST OFF)` in `cmake/abseil-cpp.cmake` makes it hard to use external gtest for the absl subdependency.
Was it intentional to not support external gtest? I've found that one workaround for these is to add aliases for the gtest targetes, and to set ABSL_FIND_GOOGLETEST=ON.
Contributor guide
Assessment
This issue has not been assessed yet.