/CPPMinT

Personal C++ project template

Primary LanguageC++MIT LicenseMIT

CPPMinT

A minimal C++ project template.

Why

I bounce around a lot, with new ideas and things to try out. I frequently spin up various projects locally and spend far too much time constantly writing new CMakeList.txt from scratch; the majority of them all the same. So this repo will serve as my main template for all my experimental projects.

Why not other project templates/bootstrappers

I just wanted my own, in my own style, with my own customizations.

How to use

git clone https://github.com/wigglewizard/CPPMinT <projectname>
cd <projectname>

Open CMakeLists.txt and rename the project. Now generate project files:

mkdir build
cd build
cmake ..

What comes with CPPMinT

Firstparty

  • Application base class (ApplicationBase.h).
    • Provides initialization and transitive methods for ImGui.
  • Easy to use logging macros to easily create categorized logs: LOGGER(logger, MyApplicationCategory).
  • SimpleBench for very simple code timings.
  • EASTL bootstrapping + eastl::string formatters for use with fmt and spdlog.
  • Application filled with examples of how to use each library and CPPMinT features.
  • Common.h with shorthands for commonly typed namespaces (like ea = eastl).

Thirdparty

Currently, there's no way to configure which ones will be compiled into your project beyond editing thirdparty/CMakeLists.txt so all the following libs are compiled into your executable:

  • CPM.cmake - CMake dependency manager.
  • EASTL - Fantastic standard library from EA. Contains everything from the STD library set and then some.
  • spdlog - Super easy to use, minimal logging tool: spdlog::info("{} iterations", i);
  • fmt - String formatter. Used in spdlog.
  • SkeletonMinRes - Minimal automatic resource (glsl, scripts, textures, etc) embedding tool.
  • argparse - Argument parser for modern C++.
  • glfw - Windowing.
  • imgui - Immediate mode GUI.