如何在CMake中使用OpenCV的测试框架? [英] How do I use OpenCV's test framework with CMake?

查看:73
本文介绍了如何在CMake中使用OpenCV的测试框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OpenCV似乎有一个基于GTest的测试框架.他们将它用于自己的单元测试,但是我找不到有关如何在OpenCV之外使用它的文档,示例或教程.

It seems like OpenCV has a test framework based on GTest. They use it for their own unit tests, but I can not find documentation, examples or tutorials on how to use it outside of OpenCV.

这将非常适合我打算在基于OpenCV的库中实施的测试,但是我真的不知道从哪里开始,因为我并不是CMake(构建我们的库)的专家.

It would be a perfect fit for the tests I intend to implement on our OpenCV-based library, but I do not really know where to start, as I am not really an expert in CMake (which builds our library).

我非常感谢您对某种"Hello ts World"设置的帮助,例如,如何配置主CMakeList.txt和test目录中的内容,以便运行类似于模块目录中的测试测试子目录(例如核心的测试文件夹)

I would very much appreciate help on the setup of some kind of "Hello ts World", i.e. how to configure the main CMakeList.txt and the one in the test directory in order to run tests like the ones found in the modules's test subdirectoriess (e.g. core's test folder)

推荐答案

经过一些研究和测试,我在博客中回答了自己的问题: 使用OpenCV的测试框架(带有CMake)

After some research and tests, I answered my own question in my blog : Using OpenCV's test framework (with CMake)

再次,我不是CMake专家,欢迎发表评论!

Again, I'm no CMake expert, so comments are welcome!

这篇关于如何在CMake中使用OpenCV的测试框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆