A modern C++ project template using CMake, with support for testing, formatting, and static analysis.
- CMake-based build system: Uses
CMakeLists.txtandCMakePresets.jsonfor easy configuration and building. - Code Formatting: Integrated with
.clang-formatto ensure consistent code style. - Static Analysis: Configured with
.clang-tidyfor static analysis to catch common errors. - Testing Framework: Ready for tests with a
test/directory (framework not yet integrated). - Dependency Management: A
thirdparty/directory is included for managing external libraries. - Editor Configuration:
.editorconfighelps maintain consistent coding styles across different editors and IDEs.
- A C++17 compliant compiler (e.g., Clang, GCC, MSVC)
- CMake (version 3.19 or later)
This project uses CMake Presets for a streamlined build process.
-
List available presets:
cmake --list-presets
-
Configure the project:
cmake --preset <preset name>
-
Build the project:
cmake --build --preset <preset name>
The executable will be located in
bin/<preset name>/.
./bin/<preset name>/<application name>The testing framework is not yet integrated. Once it is, you can run tests using CTest:
ctest --preset <preset name>.
├── CMakeLists.txt # Main CMake build script
├── CMakePresets.json # CMake presets for configuration
├── README.md # This file
├── bin/ # Output directory for binaries
├── build/ # Build directory for intermediate files
├── cmake/ # Helper CMake scripts
├── src/ # Source code
│ └── app/
│ └── main.cpp # Main application entry point
├── test/ # Test source code
└── thirdparty/ # Third-party libraries
This project is licensed under the MIT License.