[OpenMP] Check for gtest when building libomptarget unit tests (#76141)

This patch addresses an issue introduced in pull request #74398. CMake
will attempt to re-build gtest if openmp is enabled as a project (as
opposed to being enabled as a runtime). This patch adds a check that
prevents this from happening.

GitOrigin-RevId: cb3a8934365c11ab23c918b44985f5a2f287acb1
1 file changed