Template for cmake c++ projects.
Requires Conan and CMake. They can be installed by:
pip install conan
pip install cmake
mkdir cmake-build-debug
cd cmake-build-debug
conan install .. --build=missing
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTING=ON -DENABLE_BENCHMARKS=ON ..
cmake --build .
mkdir cmake-build-release
cd cmake-build-release
conan install .. --build=missing
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=OFF -DENABLE_BENCHMARKS=OFF ..
cmake --build .
cd <build folder>
./TEMPLATE <program_options>
- Add external dependencies via conan package manager
- All unit tests must be in tests folder
- All benchmarks must be in benchmarks folder
- All headers must be in include folder
- All sources must be in src folder