# ttroy50/cmake-examples

Useful CMake Examples

Repository: https://github.com/ttroy50/cmake-examples
Canonical: https://ross.abutalabs.com/products/cmake-examples
Homepage: http://ttroy50.github.io/cmake-examples
Language: CMake
License: MIT
License Family: permissive
Topics: cmake, cpp, tutorial, clang, cppcheck, static-analysis, clang-format, unit-testing, google-test, catch, boost, cpack, ctest
Last push: 2024-02-28T22:39:37+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3938, "days_push": 917, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_readme
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 13076, forks 2521 (observed 2026-08-28T04:11:01.955790+00:00)

## What it is
A collection of CMake example configurations arranged as a progressive tutorial, from basic builds to advanced features like testing, static analysis, and packaging. It is a learning resource for developers building C++ projects with CMake.

## Use cases
- learn cmake from scratch
- set up unit testing with gtest in cmake
- add static analysis with cppcheck to a cmake project
- package a c++ project with cpack
- configure clang-format in cmake
- structure a modular c++ project with cmake

## When to choose
- you are new to CMake and want a step-by-step tutorial with runnable examples
- you need reference snippets for testing, static analysis, or packaging in CMake
- you want a free MIT-licensed resource to onboard a C++ team to CMake

## When to avoid
- you need official, exhaustive CMake documentation rather than curated examples
- you are looking for a build tool or library to include in your project rather than learning material
- you need examples verified on platforms other than Linux without adaptation

## Facets
- artifact type: learning-resource
- maturity: stable
- function: build-tool, testing, documentation
- domain: developer-tools, tutorials, compilers
- platform: windows, cross-platform
- tags: cmake, cpp, build-systems, tutorial, unit-testing, static-analysis, cpack, ctest, linux, macos

## Member repositories
- ttroy50/cmake-examples (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:01.955790+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:13:33.290656+00:00, confidence not recorded.
  - homepage: http://ttroy50.github.io/cmake-examples (fetched 2026-08-29T08:09:04.021447+00:00, sha 2e1b33776470)
- Data as of 2026-08-30T08:39:29.467469+00:00.
