# cannot use gtest\_add\_tests and gtest\_disover\_tests in lates cmake

**URL:** <https://discourse.cmake.org/t/cannot-use-gtest-add-tests-and-gtest-disover-tests-in-lates-cmake/991>\
**Category:** Code\
**Tags:** os:windows\
**Created:** [April 11, 2020, 6:59pm UTC](https://discourse.cmake.org/t/cannot-use-gtest-add-tests-and-gtest-disover-tests-in-lates-cmake/991 "2020-04-11T18:59:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fido](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fido/32/510_2.png) [@Fido](https://discourse.cmake.org/u/Fido)\
**Post date:** [April 11, 2020, 6:59pm UTC](https://discourse.cmake.org/t/cannot-use-gtest-add-tests-and-gtest-disover-tests-in-lates-cmake/991/1 "2020-04-11T18:59:37Z")

</div>

When I use any of these two commands, the result is:

`CMake Error at CMakeLists.txt:67 (gtest_add_tests): Unknown CMake command "gtest_add_tests".`

Any suggestion for what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [April 11, 2020, 11:18pm UTC](https://discourse.cmake.org/t/cannot-use-gtest-add-tests-and-gtest-disover-tests-in-lates-cmake/991/2 "2020-04-11T23:18:32Z")

</div>

It appears that you need `include(GoogleTest)` to gain access to those commands.
