/multi-module-cpp-project-example

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

Primary LanguageC++MIT LicenseMIT

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)