Commit Graph

5 Commits

Author SHA1 Message Date
Eero Aaltonen
50bf457a0d 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.

As GTest may be built with or without GMock, skip GMock if it is not
present.

Do not provide result variables for GMock.  They are not provided by
upstream GTest's CMake Package Configuration File.

Also update the test case to cover linking to `GTest::gmock`.
2021-11-22 11:23:39 -05:00
Paweł Bylica
fbd3ea2047 FindGTest: Add GTest::{gtest,gtest_main} library names
This introduces 2 new INTERFACE IMPORTED libraries: GTest::gtest and
GTest::gtest_main. They link to GTest::GTest and GTest::Main targets
respectively, therefore working as aliases. These new names map the
names of the targets from upstream GTest's CMake package config.

Fixes: #20255
2020-01-24 10:18:36 -05:00
Matthew Woehlke
4636c64bfe FindGTest: Improve test to catch link error
Add a reference to one of Google Test's command-line flags to the
FindGTest test. This will ensure that we are using the correct compile
definitions on Windows, as the test will otherwise fail to link. (IOW,
this tests the changes made by the previous commit.)
2017-09-18 10:01:15 -04:00
Craig Scott
0fb0f346c0 Tests: Remove unnecessary setting of CMAKE_MODULE_PATH 2017-05-16 08:05:32 +10:00
Roger Leigh
99afe23513 Tests: Add tests for FindGTest 2015-12-10 23:09:16 +00:00