This is a simple project template that uses CMake, the package manager Conan, and the test library Catch.
Its main purpose is to provide a project structure that is ready to go with only minimal adjustments depending on the project itself.
The default structure is configured for building a library, as well as providing an app that uses it.
The folders break down as follows:
project
├── CMakeLists.txt
├── conanfile.py
│
├── apps
│ ├── CMakeLists.txt
│ └── main.cpp
│
├── include
│ └── libname
│ └── hello_world.h
├── src
│ ├── CMakeLists.txt
│ └── hello_world.cpp
│
└── tests
├── CMakeLists.txt
├── example_test.cpp
└── main.cpp
This project depends on CMake and Conan, which need to be installed prior to using this template.
The folder structure can be copied and used directly with only a few minor adjustments.
- Modify the name of the project in the root
CMakeLists.txt
. - Modify the include folder name
From the root of the project:
mkdir build && cd build
conan install .. && conan build ..
- Run tests with
ctest -V
Coming soon™