ttroy50/cmake-examples ? reverse-engineered prompt

Reverse engineered prompt

Build me a clean little CMake examples project that teaches modern C plus plus build setup from the basics to more advanced stuff.

I want it organized like a tutorial, with a simple first example, then ones that show sub projects, generated files, static analysis, unit testing, an installer, and basic package management. Make it easy to build on Linux with a recent CMake, and include clear readme notes so someone new to CMake can follow along and try each example themselves.

Please keep the examples practical and small, but real enough to show how people actually use CMake with tests and packaging. If you need to check current docs or best practices online, go ahead and look them up. Also make it easy to run everything from the command line, and include whatever helper scripts or test steps are needed so the whole thing feels polished and ready to learn from.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab