]> code.ossystems Code Review - openembedded-core.git/commit
cmake: FindGTest: Add target for gmock library
authorEero Aaltonen <eero.aaltonen@vaisala.com>
Tue, 30 Nov 2021 13:23:59 +0000 (15:23 +0200)
committerSteve Sakoman <steve@sakoman.com>
Mon, 6 Dec 2021 14:48:48 +0000 (04:48 -1000)
commit3b05fb01ec0e51c85d8ed62618467e57be91b928
treef8bfc430bb3ec91931acd9ebea959e9bdfd0febf
parent3f23e40581f90b6a7c5a280e049a0188b8be8d75
cmake: FindGTest: Add target for gmock library

`googlemock` has been absorbed into the
[googletest](https://github.com/google/googletest) project and is built
and installed from the same source tree.

`googletest` has provided a CMake Config-file Package starting with
GTest 1.8.1. `find_package(GTest ...)` by default dispatches first to
CMake Find Module. Starting with CMake commit
2327b4330cce157d616ff8b611b3e77568d00351 in CMake v3.20.0 the module
dispatches onward to the Config-file Package so that the same targets
are available. In pre v3.20.0 versions of CMake however the Find Module
masks the targets provided by the upstream `GTest` package.

Update `Modules/FindGTest.cmake` to provide the same targets as the
CMake Config-file Package and backwards compatible targets and result
variables.

Signed-off-by: Eero Aaltonen <eero.aaltonen@vaisala.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-devtools/cmake/cmake-native_3.16.5.bb
meta/recipes-devtools/cmake/cmake/0006-cmake-FindGTest-Add-target-for-gmock-library.patch [new file with mode: 0644]