Skip to content

karvozavr/multi-module-cpp-project-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example of a multi-module C++ project with CMake

  • CMake multi-module project
  • Tests via Catch2

Description

Toy banking-system application is used in the example.

Build

./build.sh --clean

Run tests:

./run_tests.sh

Run application

./build/application/bank-system

Project structure

Each module has it's own CMakeLists.txt. There are examples of different build targets:

  • account module is built as a static library
  • application module is built as an executable
  • test module is built as an executable (main function is generated by Catch2 testing library)