Skip to content

A cmake C/C++ project template configured for unit testing and code coverage

Notifications You must be signed in to change notification settings

cynical-media/cmake_googletest_gcov

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMake & GoogleTest & GCOV

Description

This is a template of a cmake C/C++ project configured for unit testing with googletest and code coverage with gcov and lcov.

Project structure

.
├── CMakeLists.txt
├── inc
│   └── cub.h
├── lib
│   ├── cmake-modules
│   └── googletest
├── README.md
├── src
│   ├── CMakeLists.txt
│   ├── cub.cc
│   └── main.cpp
└── test
    ├── inc
    └── src
        ├── CMakeLists.txt
        └── cub_test.cc
  • The googletest and cmake-modules were added to this repository via git-subtree, so you can easily update these repositories with the following commands:

    cd root_of_this_project
    git subtree pull --squash --prefix=lib/cmake-modules [email protected]:bilke/cmake-modules.git master
    git subtree pull --squash --prefix=lib/googletest [email protected]:google/googletest.git master

Projects used

Note

  • The code coverage output can be seen by opening the following file in a web browser:

    cmake-build-debug/test_coverage/index.html

About

A cmake C/C++ project template configured for unit testing and code coverage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 75.2%
  • Python 11.7%
  • CMake 10.5%
  • Shell 1.0%
  • Makefile 0.6%
  • M4 0.6%
  • C 0.4%