[Windows篇] 在windows 10上源码编译gtest 并编写CMakeLists.txt
本文首发于个人博客https://kezunlin.me/post/aca50ff8/,欢迎阅读!
compile gtest on windows 10
Guide
download
wget https://github.com/google/googletest/archive/release-1.8.0.zip
compile
mkdir build
cd build
sudo cmake-gui ..
with options
BUILD_SHARED_LIBS ON
CMAKE_CONFIGURATION_TYPES Release
compile and install gtest to C:\Program Files\gtest.
CMakeLists.txt
if(MSVC)
SET(GTEST_ROOT "C:/Program Files/gtest")
else()
# BOOST_THREAD_LIBRARY /usr/lib/x86_64-linux-gnu/libpthread.so
MESSAGE( [Main] " BOOST_THREAD_LIBRARY = ${BOOST_THREAD_LIBRARY}")
endif(MSVC)
find_package(GTest REQUIRED) # GTest 1.8.0
find_package(GTest REQUIRED) # GTest 1.8.0
include_directories(${GTEST_INCLUDE_DIRS})
target_link_libraries(demo ${GTEST_LIBRARIES} ${BOOST_THREAD_LIBRARY})
Reference
History
- 20180301: created.
Copyright
- Post author: kezunlin
- Post link: https://kezunlin.me/post/aca50ff8/
- Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 3.0 unless stating additionally.
[Windows篇] 在windows 10上源码编译gtest 并编写CMakeLists.txt的更多相关文章
- Windows 10上源码编译Poco并编写httpserver和tcpserver | compile and install poco cpp library on windows
本文首发于个人博客https://kezunlin.me/post/9587bb47/,欢迎阅读! compile and install poco cpp library on windows Se ...
- [Ubuntu篇] 在ubuntu上源码编译gtest,编写gtest-config.cmake并测试
本文首发于个人博客https://kezunlin.me/post/4a1427cf/,欢迎阅读! compile gtest on ubuntu 16.04 Guide compile gtest ...
- Ubuntu 16.04源码编译boost库 编写CMakeLists.txt | compile boost 1.66.0 from source on ubuntu 16.04
本文首发于个人博客https://kezunlin.me/post/d5d4a460/,欢迎阅读! compile boost 1.66.0 from source on ubuntu 16.04 G ...
- windows 10 上源码编译OpenCV并支持CUDA | compile opencv with CUDA support on windows 10
本文首发于个人博客https://kezunlin.me/post/6580691f/,欢迎阅读! compile opencv with CUDA support on windows 10 Ser ...
- windows 10上源码编译dlib教程 | compile dlib on windows 10
本文首发于个人博客https://kezunlin.me/post/654a6d04/,欢迎阅读! compile dlib on windows 10 Series Part 1: compile ...
- Windows 10上源码编译glog和gflags 编写glog-config.cmake和gflags-config.cmake | compile glog and glags on windows from source
本文首发于个人博客https://kezunlin.me/post/bb64e398/,欢迎阅读! compile glog v0.3.5 and glags on windows from sour ...
- windows 10上源码编译libjpeg-turbo和使用教程 | compile and use libjpeg-turbo on windows 10
本文首发于个人博客https://kezunlin.me/post/83828674/,欢迎阅读! compile and use libjpeg-turbo on windows 10 Series ...
- [Part 4] 在Windows 10上源码编译PCL 1.8.1支持VTK和QT,可视化三维点云
本文首发于个人博客https://kezunlin.me/post/2d809f92/,欢迎阅读! Part-4: Compile pcl with vtk qt5 support from sour ...
- Ubuntu 16.04上源码编译Poco并编写cmake文件 | guide to compile and install poco cpp library on ubuntu 16.04
本文首发于个人博客https://kezunlin.me/post/281dd8cd/,欢迎阅读! guide to compile and install poco cpp library on u ...
随机推荐
- ssd原理及代码实现详解
通过https://github.com/amdegroot/ssd.pytorch,结合论文https://arxiv.org/abs/1512.02325来理解ssd. ssd由三部分组成: ba ...
- Leetcode(9)回文数
Leetcode(9)回文数 [题目表述]: 判断一个整数是否是回文数.回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数. 第一次:直接全部转 执行用时:148 ms: 内存消耗:13.4 ...
- Solr导入MongoDB数据
数据导入方式: 全量导入和增量导入: query 是全量导入时,把你的数据中查到的数据全部导入,deltaImportQuery 和 deltaQuery 是增量导入数据所需要的两个查询语句.delt ...
- (day27)subprocess模块+粘包问题+struct模块+ UDP协议+socketserver
目录 昨日回顾 软件开发架构 C/S架构 B/S架构 网络编程 互联网协议 socket套接字 今日内容 一.subprocess模块 二.粘包问题 三.struct模块 四.UDP 五.QQ聊天室 ...
- Unity 单例模式
明天十一放假,今天不知什么原因看到一篇unity单例模式的介绍,瞬间来了戾气. (一)最简单的单利 public class WebRequestUtility : MonoBehaviour { p ...
- PCES - alpha阶段测试报告
测试计划 测试目的 本测试目的在于测试项目完成情况,以及分析测试结果,为下一轮开发提供解决方案 测试项目 学生用户登录测试 课程信息检索测试 服务器测试 在测试过程中出现的Bug 用户界面间的跳转逻辑 ...
- WARNING: The host 'WeiLei' could not be looked up with resolveip.
[root@WeiLei data]# /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysq ...
- 【MySQL】MySQL忘记密码或修改密码的方法
MySQL修改新密码方法 记得原密码情况下,修改新密码:登录到数据库后,输入 set password for 用户名@localhost = '新密码'; 来设置新的密码,别忘记分号哦.如图所示: ...
- Python3爬虫(3)_urllib.error
注:参照https://blog.csdn.net/c406495762/article/details/59488464 Learn_ERROR: urllib.error可以接收有urllib.r ...
- 程序员接私活经验总结,来自csdn论坛语录
以下为网上摘录,以做笔记: 可是到网上看看,似乎接私活也有很多不容易,技术问题本身是个因素,还有很多有技术的人接私活时被骗,或者是合作到最后以失败告终,所以想请有经验的大侠们出来指点一下,接私活是怎么 ...