doctest-cmake
CommunitySet up doctest in CMake with colocated tests
AuthorEvitanRelta
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Setting up the doctest single-header framework in CMake C++ projects can be verbose; this skill guides a clean pattern to enable tests colocated with implementation code, reducing boilerplate and keeping tests nearby.
Core Features & Use Cases
- Colocated tests: Write tests in test_main.cpp alongside source files.
- Doctest header integration: Use the header-only doctest library in your project structure.
- CMake integration: Create a separate tests target that mirrors the main executable while keeping test code disabled in the app.
Quick Start
Create test_main.cpp with DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN and include doctest/doctest.h, then add a tests target in CMake alongside your main app.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: doctest-cmake Download link: https://github.com/EvitanRelta/doctest-cmake/archive/main.zip#doctest-cmake Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.