Skip to content

i05nagai/cmake_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cmake sample using gtest, gmock and boost.

This is a sample of cmake with gtest, gmock and boost.

Description

  • Gtest, gmock and boost are included as git submodule.
  • Gtest, gmock and boost are build with cmake.

Directory structure are below:

.
├── project
│   ├── target
│   │   └── folder
│   ├── target2
│   │   └── folder
│   ├── target2_test
│   │   └── folder
│   │       └── mock
│   └── target_test
│       └── folder
│           └── mock
├── submodule
│   ├── boost
│   │   └── numeric
│   │       └── ublas
│   └── googletest
│       ├── googlemock
│       └── googletest

Requirement

  • cmake
  • git

Usage

cmake .
make

if you want to execute tests:

make test

or

ctest -V

make_file_list.sh generates sources and headers lists for cmake. With the following command, name_of_target.cmake, which contains lists of sources and headers, is generated.

sh make_file_list.sh path/to/target name_of_target

For instance, if you want to generate target.cmake in this repository, execute below:

sh make_file_list.sh project/target target

Install

git clone https://github.com/i05nagai/cmake_template.git

Licence

MIT

Author

i05nagai

About

cmake template with gtest, gmock and boost.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published