Coder Social home page Coder Social logo

dubzzz / gtest-using-cmake-example Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 14 KB

Example of how defining a CMakeLists.txt in order to run unit-tests using Google Test framework on travis-ci and appveyor

License: MIT License

CMake 42.14% C++ 57.86%
appveyor gtest cmakelists travis

gtest-using-cmake-example's Introduction

Google Test using CMake -- example Build StatusBuild status

This repository provides a very simple example of how defining a CMakeLists.txt in order to run unit-tests using Google Test framework.

The build system cross-platform (GNU/linux, Windows) and cross-compilers (clang, g++ and visual studio) is also considered.

  • .travis.yml: configuration to build such projects on Unix-based platforms with clang or g++.
  • appveyor.yml: configuration to build such projects on Windows platforms using Visual Studio compiler

Compiling and linking against Google Test under Windows

As stated on Google Test official repository, at https://github.com/google/googletest/blob/master/googletest/README.md, gtest-md.sln solution build the dynamic version of GTest while the other is to consider for a static linkage.

The msvc\ folder contains two solutions with Visual C++ projects. Open the gtest.sln or gtest-md.sln file using Visual Studio, and you are ready to build Google Test the same way you build any Visual Studio project. Files that have names ending with -md use DLL versions of Microsoft runtime libraries (the /MD or the /MDd compiler option). Files without that suffix use static versions of the runtime libraries (the /MT or the /MTd option). Please note that one must use the same option to compile both gtest and the test code. If you use Visual Studio 2005 or above, we recommend the -md version as /MD is the default for new projects in these versions of Visual Studio.

gtest-using-cmake-example's People

Contributors

dubzzz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.