本文首发于个人博客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

[Windows篇] 在windows 10上源码编译gtest 并编写CMakeLists.txt的更多相关文章

  1. 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 ...

  2. [Ubuntu篇] 在ubuntu上源码编译gtest,编写gtest-config.cmake并测试

    本文首发于个人博客https://kezunlin.me/post/4a1427cf/,欢迎阅读! compile gtest on ubuntu 16.04 Guide compile gtest ...

  3. 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 ...

  4. 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 ...

  5. windows 10上源码编译dlib教程 | compile dlib on windows 10

    本文首发于个人博客https://kezunlin.me/post/654a6d04/,欢迎阅读! compile dlib on windows 10 Series Part 1: compile ...

  6. 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 ...

  7. 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 ...

  8. [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 ...

  9. 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 ...

随机推荐

  1. Gstreamer基础教程10 - Streaming

    摘要 我们把直接从网络播放一个媒体文件的方式称为在线播放(Online Streaming),我们已经在以往的例子中体验了GStreamer的在线播放功能,当我们指定播放URI为 http:// 时, ...

  2. 用FILE*指针对象读文件的方式。

      先直接上代码: ]; ]; char* ptr1; ]; FILE* fh; QString strpath = getenv("GCDIR"); QString str_in ...

  3. R的安装

    更新时间:2019.09.23 1. 序言 之前曾经用过一段时间的R(一直忍受着原生R那个超级"简洁"的界面),但是后来重装了系统并且学习了Python,就没有再怎么碰过R了.然而 ...

  4. Kubernetes入门学习--在Ubuntu16.0.4安装配置Minikube

    目 录 一. 安装minikube环境 1.1. 安装前准备 1.2. 安装Lantern 1.2.1. Lantern下载网站 1.2.2. Lantern下载地址 1.2.3. Lantern安装 ...

  5. node项目发布+域名及其二级域名配置+nginx反向代理+pm2

    学习node的时候也写了一些demo.但是只是限于本地测试,从来没有发布.今天尝试发布项目. 需要准备的东西 node 项目:为了突出重点,说明主要问题.我只是拿express 写了很简单的demo. ...

  6. 机器学习回顾篇(9):K-means聚类算法. slides

    .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px so ...

  7. Python能做什么,自学Python效果怎么样?

    短时间掌握一门技能是现代社会的需求.生活节奏越来越快,现在不是大鱼吃小鱼,而是快鱼吃慢鱼的时代,人的时间比机器的时间更值钱.Python作为一种轻量级编程语言,语言简洁开发快,没那么多技巧,受到众多追 ...

  8. API gateway 之 kong 基本操作 (三)

    一.演示环境准备 1.nginx配置 [root@nginx conf.d]# pwd /etc/nginx/conf.d [root@nginx conf.d]# ls conf_bak kong_ ...

  9. [开源]基于goapp+xterm实现webssh-网页上的SSH终端(golang)

    简析 基于goapp+xterm实现webssh-网页上的SSH终端. 开源地址见文末. 特性 在网页上实现一个SSH终端.从而无需Xshell之类的模拟终端工具进行SSH连接. 可以对交互命令进行审 ...

  10. CSPS模拟 60

    T1 m+logn的约瑟夫 T2 考数学的Bit T3 很裸但就是不会打的LCIS 哭哭. 如果下次还考这种题我一定要想出来.