← ClaudeAtlas

cmake-stylelisted

Write or edit CMakeLists.txt in Tsukini's style (from libutils, context-forge, c2dmp-hsm) - fixed section order with '# =====' banners, TARGET variable, clang++ C++20, ccache, warnings, explicit SRC list with group comments, Debug/Asan/Optimized modes, release targets, exception header generation, GTest tests/, install + find_package config, CPack RPM/DEB with stable/pre channels, Makefile wrapper. Use whenever creating, editing or reviewing a CMakeLists.txt, a tests/CMakeLists.txt, a *Config.cmake.in or the CMake packaging of one of the user's projects.
TsukiNi22/ai-utils · ★ 1 · Code & Development · score 74
Install: claude install-skill TsukiNi22/ai-utils
# Tsukini CMake style `<name>` (a skill) = the folder of that skill: `~/.claude/skills/<name>` (setup.sh) or `${CLAUDE_SKILL_DIR}/../../*/<name>` (plugin of the marketplace). **A new project**: the `CMakeLists.txt` of **cpp_project_template** (made by `cpp-project`) is the reference and is kept as generated - one file for every kind (`<NAME>_KIND` binary / library / header-only, `<NAME>_PACKAGE_BIN` / `_LIB` / `_DEV`, `<NAME>_SHARED_LIB`), `SRC` / `SRC_SHARED`, the `release` / `install_release` / `package_release` targets, CPack with the `-op` / `-db` / `-as` variants and the `mingw64-` packages, the MinGW toolchain `cmake/toolchain/mingw-w64.cmake`. The templates below are for an existing project or a CMake written by hand, in the same style. Templates (copy, then replace `<name>` = target/package name, `<NAME>` = upper-case option prefix, `<x.y.z>` = version, `<summary>` = package description, `<utils-version>` = minimal libutils version): | Project kind | Files | |---|---| | executable (context-forge) | `templates/app/CMakeLists.txt` | | installable library (libutils) | `templates/lib/CMakeLists.txt` + `templates/lib/NAMEConfig.cmake.in` -> `cmake/package/<name>Config.cmake.in` | | header-only library (c2dmp-hsm) | `templates/lib/CMakeLists.txt` with the `src/nothing.cpp` trick (see below) | | unit tests (GTest) | `templates/tests/CMakeLists.txt` -> `tests/CMakeLists.txt` | | helpers | `templates/Makefile` (root), `templates/check_files.sh` -> `cmake/scripts/` | Full