Skip to content

amolgawai/modern-cpp-practice

Repository files navigation

Modern C++ Practice

Introduction

This repository is for practicing and learning modern c++ (post c++11) and modern cmake (post 3.0) The repository is based on my modern-cpp-cmake-starter. The code is for practice and hence might not be the best according to standards and best practices.

* Building with CMake

# configure build with ninja
 cmake -S . -B build -GNinja
# build everything
 cmake --build build
# build specific target
 cmake --build build --target <name>
# configure with code quality tools namely sanitizers, cppcheck, include what you use (iwyu), codecoverage
 cmake -S . -B build -GNinja -DUSE_SANITIZER='Memory;MemoryWithOrigins;Thread;Leak;Address;Undefined' -DUSE_STATIC_ANALYZER='clang-tidy;iwyu;cppcheck' -DENABLE_CODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Coverage

* Generating diagrams using clang-uml

# Run clang-uml in the project's top directory:
clang-uml
# or to see generation progress for each diagram
clang-uml --progress
# Generate SVG images from the PlantUML diagrams:
plantuml -tsvg diagrams/*.puml

# or generate also MermaidJS diagram
clang-uml --progress -n some_class_diagram -g mermaid
mmdc -i diagrams/some_class_diagram.mmd -o diagrams/some_class_diagram.svg

# Add another diagram:
clang-uml --add-sequence-diagram another_diagram
# list the diagrams defined in the config file:
clang-uml -l

☛ TODO Practice Plan

References

About

For practicing modern c++ (post c++11)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published