项目作者: i05nagai

项目描述 :
cmake template with gtest, gmock and boost.
高级语言: C++
项目地址: git://github.com/i05nagai/cmake_template.git
创建时间: 2016-08-13T05:13:42Z
项目社区:https://github.com/i05nagai/cmake_template

开源协议:

下载


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:

  1. .
  2. ├── project
  3. ├── target
  4. └── folder
  5. ├── target2
  6. └── folder
  7. ├── target2_test
  8. └── folder
  9. └── mock
  10. └── target_test
  11. └── folder
  12. └── mock
  13. ├── submodule
  14. ├── boost
  15. └── numeric
  16. └── ublas
  17. └── googletest
  18. ├── googlemock
  19. └── googletest

Requirement

  • cmake
  • git

Usage

  1. cmake .
  2. make

if you want to execute tests:

  1. make test

or

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

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

  1. sh make_file_list.sh project/target target

Install

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

Licence

MIT

Author

i05nagai