[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 ...
随机推荐
- 把图片在word中显示
如下: //放入word中 #region word ThreadPool.QueueUserWorkItem(//使用线程池 (P_temp) =>//使用lambda表达式 { G_wa = ...
- WPF_在APP.xaml应用资源样式
先上代码: <Application x:Class="NetAnalysis.App" xmlns="http://schemas.microsoft.com/w ...
- 中国大学MOOC-数据结构与算法实战 P6 括号匹配 (15 分)
检查一段C语言代码的小括号( ). 中括号 [ ] 和大括号{ } 是否匹配. 输入格式: 在一行中输入一段C语言代码,长度不超过1000个字符(行末以换行符结束). 输出格式: 第一行输出左括号的数 ...
- 使用C++代码打印数字正方形
使用C++代码打印数字正方形 作为一名初学者,最近在跟着网课学习C++程序设计基础.在学习过程中遇到了一些习题,我根据自己的理解和思路写了一些代码实现,算是对自己学习过程的一个记录,也希望可以对别人有 ...
- JAVA eclipse 问题汇总(持续更新)
解决eclipse中文字很小 新下载的eclipse4.2.1版本,显示中文字体很小,但是英文比较正常.网上查看要更改字体大小,但是更改后英文也变大了,不是想要的结果.window – prefere ...
- 开发架构+osi七层协议+socket(day26)
目录 软件开发架构 C/S架构 B/S架构 网络编程 互联网协议/OSI七层协议 传输层 网络层 数据链路层 物理连接层 socket 什么是socket 为什么用socket 如何使用 软件开发架构 ...
- MyBatis(3)-- Mapper映射器
一.select元素 1.select元素的应用 id为Mapper的全限定名,联合称为一个唯一的标识 paremeterType标识这条SQL接收的参数类型 resultType标识这条SQL返回的 ...
- AS报错:lambda expressions are not supported at this language level
AS报错:lambda expressions are not supported at this language level 解决方法 打开打开 File --> Project Stuct ...
- python购物车小案例
python购物车小案例# 案列描述:有一个小型水果店里面有水果(苹果:¥8/kg,香蕉:¥5/kg,芒果:¥15/kg,葡萄:¥12/kg),客户带了100元钱进店选购水果.# 1.客户输入相应序号 ...
- 替换word中的数据,并给导入word的图片添加水印
public static void ExportWord(string tempFilePath, string outPath, Dictionary<string, string> ...