未知的 CMake 命令“gtest_discover_tests”
有人可以解释一下如何正确安装 Cmake 和 GoogleTest 以便命令
gtest_discover_tests
可用吗?我
cmake-3.23.0-rc3
从源代码
googletest-release-1.11.0
出现以下错误,我仍然无法编译该项目
https://github.com/D-os/libbinder
安装,但由于
CMake Error at tests/CMakeLists.txt:15 (gtest_discover_tests):
Unknown CMake command "gtest_discover_tests".
我使用 Slackware 14.2 x64
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该函数在
GoogleTest
脚本中定义文件(模块),因此您需要像这样包含它:include(GoogleTest)
然后您就可以使用该函数。
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.