This project is not finished, yet!
Even if this readme says that it uses/supports X, that may not be the case, yet!
cpp-starter-project
is a personal starter project for modern C++ development.
Its goal is to offer a set of modern tools and resources to interested
developers (e.g. students) that want to create executable programs. This
project is not intended for creating libraries.
I found many C++ starter projects and even more tutorials that give a good introduction into starting new C++ and CMake projects but none of them were either up-to-date (speaking C++20 and CMake >= 3.12) or had all features that I'd like to have like package managers or continuous integration.
Documentation about how this starter project is structured and which continuous
integration services, etc. are used can be found in
docs/cpp-starter
.
Generated Sphinx documentation can be found at https://bugwelle.github.io/cpp-starter-project/
This project aims to be a full-fledged entry point for new medium-sized projects.
Following features are included:
- project structure common to C++ projects (similar to pitchfork)
- modern C++ (currently C++20)
- modern CMake >= 3.12
(no more
include_directories(...)
orlink_libraries(...)
) - testing framework (Catch2)
- user documentation using Doxygen and Sphinx
- documentation using Doxygen and Sphinx
- GitHub Pages on
gh-pages
branch - code formatting because no one has got time for that in code reviews
(
clang-format
andcmake-format
) - static code analysis tools like linters
(
cppcheck
,clang-tidy
,shellcheck
) - continuous integration: useful not only for pull requests (Travis CI, AppVeyor, GitLab CI)
- continuous deployment to GitHub Pages
- code coverage using Codecov
- CPack script for packaging
This project no longer uses Conan as package manager. I've also not included VCPKG or other package managers. None are perfect, all have their drawbacks. If you want to use Conan, you can still do so. Please refer to their "Getting started" guide.
This project was inspired by:
- https://github.com/abdes/asap
- https://github.com/lefticus/cpp_starter_project
- https://github.com/ttroy50/cmake-examples
- https://github.com/kartikkumar/cppbase
- https://github.com/richelbilderbeek/travis_cpp_tutorial
- https://github.com/codecov/example-cpp11-cmake
- https://github.com/cginternals/cmake-init
- https://github.com/LearningByExample/ModernCppCI (https://juan-medina.com/2017/07/01/moderncppci/)
See LICENSE
. This project contains third-party software like CMake
modules and C++ libraries. See section "Third Party".
This project uses:
- Catch2
- Website: https://github.com/catchorg/Catch2
- License: Boost Software License 1.0
- Reason: Testing framework
- range-v3
- Website: https://github.com/ericniebler/range-v3
- License: Boost Software License 1.0
- Reason: C++ ranges implementation
We also use some CMake modules. See cmake/README.md
.
Because we use range-v3 and other modern C++ features, we only support these compilers:
- Windows
- MSVC 2017 version >= 15.9
- TODO: MinGW64
- macOS
- TODO: clang
- TODO: GCC
- linux
- TODO: clang
- TODO: GCC