Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown CMake command "gtest_discover_tests"

Can someone explain me please how to install properly Cmake and GoogleTest so the command

gtest_discover_tests

becomes available ?. I installed

cmake-3.23.0-rc3

and

googletest-release-1.11.0

from source but I still can't compile that project

https://github.com/D-os/libbinder

because of fallowing error

CMake Error at tests/CMakeLists.txt:15 (gtest_discover_tests):
Unknown CMake command "gtest_discover_tests".

I'm using Slackware 14.2 x64

like image 359
Daro Avatar asked Jul 31 '26 22:07

Daro


1 Answers

That function is defined in the GoogleTest script file (module) so you need to include it like this: include(GoogleTest)

Then you can use the function.

like image 129
ixSci Avatar answered Aug 02 '26 20:08

ixSci