使用gtest与xcode [英] using gtest with xcode

查看:181
本文介绍了使用gtest与xcode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的计算机上设置一个c ++单元测试库,并认为google的gtest将是一个很好的适合。

I'm trying to set up a c++ unit testing library on my computer and figured that google's gtest would be a good fit.

我目前正在运行山狮与最新版本的xcode。

I am currently running mountain lion with the most recent release of xcode.

我一直在尝试按照这里,但遇到了一个棘手的问题。

I have been attempting to follow the instructions found here but am running into an intresting problem.

我打开gtest项目,即使xcode告诉我构建是成功的,我似乎找不到任何地方的框架。

I am opening the gtest project, building it, and even though xcode tells me that the build was successful, I cant seem to find the framework anywhere. any help on this subject would be highly appreciated!

谢谢!

推荐答案

这适用于我:


  1. https://github.com/dmonopoly/gtest-cmake-example

  2. 以通常的方式运行cmake GUI我使用的版本3.0.0)。点击配置,其中一个提示允许您选择XCode生成。再次点击配置,启用测试配置选项,再次点击配置(甚至可能再次),然后点击生成。

现在应该可以在指定的构建目录中找到XCode项目。打开该项目,您将找到gtest源代码,一些演示测试代码以及​​运行测试的目标。

You should now be able to find the XCode project in the build directory that you specified. Open that project, and you will find the gtest source code, some demo test code, as well as a target for running the tests.

这篇关于使用gtest与xcode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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