TsukiNi22/ai-utils / skills/cpp/cmake-style
cmake-style
VerifiedWrite 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.1 KB |
| requires.txt | markdown | 22 B |
| templates/Makefile | other | 515 B |
| templates/app/CMakeLists.txt | markdown | 6.5 KB |
| templates/check_files.shexecutable | script | 972 B |
| templates/lib/CMakeLists.txt | markdown | 7.8 KB |
| templates/lib/NAMEConfig.cmake.in | other | 1.2 KB |
| templates/tests/CMakeLists.txt | markdown | 1.2 KB |
templates/lib/NAMEConfig.cmake.in
View on GitHub@PACKAGE_INIT@
# Dependencies
include(CMakeFindDependencyMacro)
#find_dependency(<Dependency> REQUIRED)
# Custom error message if the require file doesn't exist
set(_<name>_libdir "${CMAKE_CURRENT_LIST_DIR}/../../")
if(CMAKE_BUILD_TYPE STREQUAL "Asan")
if(NOT EXISTS "${_<name>_libdir}/lib<name>_asan.a")
message(FATAL_ERROR
"The Asan version of lib<name> is not installed.\n"
"Please build it with 'cmake --build <build> --target install_release'.\n"
)
endif()
elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
if(NOT EXISTS "${_<name>_libdir}/lib<name>_debug.a")
message(FATAL_ERROR
"The Debug version of lib<name> is not installed.\n"
"Please build it with 'cmake --build <build> --target install_release'.\n"
)
endif()
else() # Default selection for noconfig
if(NOT EXISTS "${_<name>_libdir}/lib<name>.a")
message(FATAL_ERROR
"The Optimized version of lib<name> is not installed.\n"
"Please build it with 'cmake --build <build> --target install_release'.\n"
)
endif()
endif()
# Load and check tools
include("${CMAKE_CURRENT_LIST_DIR}/<name>Targets.cmake")
check_required_components(<name>)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |