▲ 0 r/cpp
I wrote a dumb bash script to scaffold C++23 Modules + CMake + LSP (SDL/Raylib) in 2 seconds
Got tired of writing CMake boilerplates and fighting clangd every time I wanted to test a C++23 module or pop a Raylib window. So I wrote startcpp.
It’s just a single bash script. No Python, no vcpkg/conan bloat, no 50-file template structures.
What it actually sets up:
- Generates a CMake config with
FILE_SET CXX_MODULESand drops<iostream>for<print>. - Forces
CMAKE_EXPORT_COMPILE_COMMANDSand symlinks it to root. Neovim/clangd picks it up instantly. - Dependency pipeline for
--raylib,--sdl2or--sdl3: triesfind_packagefirst for system binaries. Silently falls back to CPM (FetchContent) to pull the github tag if you don't have it installed locally. - Injects
ccacheand defaults to Ninja.
Usage: startcpp test_proj --raylib ninja -C build
There's a quick video in the README showing the setup.
u/000nan000 — 1 day ago