Skip to content

A cross-platform C++11/14/17 starter project with google test and google benchmark support.

License

Notifications You must be signed in to change notification settings

rommelDB/cmake-gtest-gbench-starter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmake starter with google test and google benchmark

License: MIT

A cross-platform C++17 starter project with google test and google benchmark support. See this project for a similar template with CUDA support.

The project compiles a library named nemo (of course: you should change the name, nemo means 'no one') and an executable named nemo_exe.

Organization

  • src has the source files and the CMakeLists.txt to compile the library and executable.
  • include has the header files.
  • test has the tests and related CMakeLists.txt.
  • bench has the benchmarks and related CMakeLists.txt.

The main CMakeLists.txt file at the root of the project has options and further documentation.

Build

Build Status

On Linux/Unix, to build and make the test:

$ mkdir build && cd $_
$ cmake ..
$ make

By default, the makefiles will build the library, executable, tests, and benchmarks. The commands

$ ./test/test_nemo
$ ./bench/bench_nemo

will run the tests and benchmarks. And

$ sudo make install

will install (at least on Linux) the library and executable to your computer's path.

On Windows, you can use cmake to generate Visual Studio build files with the same 'cmake ..' command.

By default, the project will be built in RELEASE mode, use

$ cmake .. -DCMAKE_BUILD_TYPE=DEBUG

to build in DEBUG mode.

See the CMakeLists.txt file to see all the options.

License

MIT

About

A cross-platform C++11/14/17 starter project with google test and google benchmark support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 52.6%
  • CMake 47.4%