cmake-manage

Manages CMake build configurations, dependencies, presets, and cross-platform setups.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/chisuhua/home --skill cmake-manage-chisuhua
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cmake-manage
Source: https://github.com/chisuhua/home/tree/main/.config/opencode/skills/cmake-manage
Command: npx skills add https://github.com/chisuhua/home --skill cmake-manage-chisuhua

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? CMake projects often suffer from dependency headaches, linker errors, missing headers, and inconsistent Debug/Release configurations across Windows, Linux, and macOS. This Skill provides structured guidance for managing CMake build systems so these issues get resolved systematically. ## Core Features & Use Cases - Dependency Management: Add third-party libraries using modern CMake approaches like FetchContent, plus guidance for package managers such as vcpkg and Conan. - Build Diagnostics: Troubleshoot common errors including missing header files, link errors, and undefined references. - Presets & Cross-Platform Configuration: Configure CMake presets and Debug/Release builds that work consistently across Windows, Linux, and macOS. - Use Case: When you need to add the fmt library to your project, the Skill shows how to declare it with FetchContent and link it via target_link_libraries without any external package manager. ## Quick Start Ask the assistant to add a third-party library to your CMakeLists.txt using FetchContent and link it to your executable target.

Frequently Asked Questions about cmake-manage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a third-party library to a CMake project?▼

Use FetchContent to declare the library with its Git repository and tag, then call FetchContent_MakeAvailable and link it with target_link_libraries. This modern CMake approach requires no external package manager.

What is the difference between FetchContent, vcpkg, and Conan in CMake?▼

FetchContent downloads and builds dependencies directly within CMake at configure time. vcpkg and Conan are external package managers that provide prebuilt or recipe-based libraries, integrated into CMake via toolchain files.

Why does CMake report undefined reference or link errors?▼

Undefined reference errors occur when a target is not linked against the library providing the symbols. Verify that target_link_libraries includes the correct library target and that the dependency was made available before linking.

How do I configure Debug and Release builds with CMake presets?▼

CMake presets define named configure and build configurations in CMakePresets.json, letting you switch between Debug and Release consistently. Presets also standardize settings across Windows, Linux, and macOS environments.

Does FetchContent work for cross-platform CMake builds?▼

Yes, FetchContent works cross-platform since it fetches and builds dependencies from source within the CMake configure step. The dependency is compiled with the same toolchain and settings as your project on Windows, Linux, or macOS.