From 4272bb51904567609a1cd35c1a38003d0a20395a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20R=C3=B6mer?= Date: Wed, 11 Oct 2023 18:26:39 +0200 Subject: [PATCH] quickstart-cmake.md: add information about linking against gmock --- docs/quickstart-cmake.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/quickstart-cmake.md b/docs/quickstart-cmake.md index 4e422b74..006ee6ca 100644 --- a/docs/quickstart-cmake.md +++ b/docs/quickstart-cmake.md @@ -117,8 +117,9 @@ gtest_discover_tests(hello_test) ``` The above configuration enables testing in CMake, declares the C++ test binary -you want to build (`hello_test`), and links it to GoogleTest (`gtest_main`). The -last two lines enable CMake's test runner to discover the tests included in the +you want to build (`hello_test`), and links it against GoogleTest (`GTest::gtest_main`). +To be able to use GoogleMock, you also need to link against gmock (`GTest::gmock`). +The last two lines enable CMake's test runner to discover the tests included in the binary, using the [`GoogleTest` CMake module](https://cmake.org/cmake/help/git-stage/module/GoogleTest.html).