Skip to content

joffman/cmake-tdd-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description
===========

A "Hello World!" program, using CMake and Catch2.

This is meant to be a template for test-driven C++ projects,
using CMake and Catch2.


Requirements
============

CMake
-----
Here is a good description of how to install CMake:
https://cgold.readthedocs.io/en/latest/first-step/installation.html

Catch2
------
Use the following commands to install (see
catchorg/Catch2#1383):
$ git clone https://github.com/catchorg/Catch2.git
$ cd Catch2
$ cmake -Bbuild -H. -DBUILD_TESTING=OFF
$ sudo cmake --build build/ --target install 


Compile & Run
=============

Compile (starting from project-root):
$ cd build-debug
$ cmake -DCMAKE_BUILD_TYPE=Debug ..
$ make

Run executable (from build-debug directory):
$ ./src/my_executable

Run tests (from build-debug directory):
$ ./test/my_test

About

A template for test-driven cmake projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published