Also renames `_target_compile_features_if_available` CMake function to
`_absl_target_compile_features_if_available` since CMake's function
namespace is global.
The dependency cycle can occur if absl is configured with test helpers
enabled, and googletest is configured to use absl.
In the case that both projects are being built from source via
FetchContent with OVERRIDE_FIND_PACKAGE, depending on the order in
which the two projects are added to the build, the check_target calls
may fail even though the build would have otherwise succeeded.
The existing `check_target` calls seem to have been originally added
to detect missing gtest targets when the `GTest::` prefix was not yet
in use. For target names without "::", CMake does not warn if they
are undefined, and just assumes they refer to system library names.
However, CMake does fail during build generation if a target name with
"::" is missing; thus the check_taget calls are redundant.
PiperOrigin-RevId: 480140797
Change-Id: Ic51631e4a36dd8b6f569ad6424bea15a4af0b875
pull/1298/head
Abseil Team2 years agocommitted byCopybara-Service