kigster / cmake-ccspec-template

CMake C++ project template that uses ccspec for unit testing, instead of Google Test library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CMake/C++ Project Template with CCSpec as Submodule

This project is a derivative of ccspec-example project, however this repo fixes some compilation and build issues in the original repo.

It provides a simple C++ project template that integrates with the ccspec unit testing library, however we are using an updated fork, which itself is a fork of this fork which fixes coloring and other nuances.

See Also

Usage

You need to have:

  • recent C++ compiler that supports C++17
  • recent cmake installed

First, clone the project into a folder:

$ git clone https://github.com/kigster/cmake-ccspec-template
$ cd cmake-ccspec-template

Automated Build

You can use the provided BASH script ./run.sh to build and run all the tests.

Manual Build

Start by initializing ccspec git submodule. This step is crucially important, as it pulls the ccspec library into the project.

$ git submodule init && git submodule update

Next we can use standard CMake semantics to build our project:

$ mkdir -p build && cd build
$ cmake ..
$ make -j 4 
$ make install
$ cd ..

This should build all dependencies, and then you can run the tests:

$ bin/binary-tree-specs

You should see something like the following output:

ccspec

Acknowledgements

People:

Repos:

About

CMake C++ project template that uses ccspec for unit testing, instead of Google Test library.


Languages

Language:C++ 72.2%Language:CMake 23.8%Language:Shell 4.0%