# CMake vs Meson: source lines of code compared

The CMake vs Meson comparison on OctoCounts shows side-by-side source line counts for Kitware/CMake and mesonbuild/meson, counted with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-17, Kitware/CMake contains 1,715,528 total lines (1,254,658 code) across 29,696 files, while mesonbuild/meson contains 182,698 total lines (141,659 code) across 4,742 files as of 2026-08-26. Kitware/CMake is about 8.9x the size of mesonbuild/meson by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [Kitware/CMake](https://octocounts.com/github/Kitware/CMake) | [mesonbuild/meson](https://octocounts.com/github/mesonbuild/meson) |
| --- | ---: | ---: |
| Files | 29,696 | 4,742 |
| Total lines | 1,715,528 | 182,698 |
| Code lines | 1,254,658 | 141,659 |
| Comment lines | 244,757 | 14,534 |
| Blank lines | 216,113 | 26,505 |
| Languages counted | 12 | 12 |

Top languages in Kitware/CMake: C (29.4% of code), C++ (24.4% of code), CMake (21.3% of code). Top languages in mesonbuild/meson: Python (70.1% of code), Meson (13.0% of code), C (5.6% of code). C, C++ appear in both top language lists; CMake, C Header, ReStructuredText appear only in Kitware/CMake's top languages; Python, Meson, JSON appear only in mesonbuild/meson's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. Kitware/CMake was counted at ref 833d9466d797619d488448ccb0be2428a77a4aac (commit 833d9466d797) on 2026-09-17; mesonbuild/meson was counted at ref master (commit 6db2b663af92) on 2026-08-26. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

Kitware/CMake counts the CMake repository: the build-system generator implemented in C++, its module library, bundled utilities, and a very large Tests directory of sample projects used to verify behavior. mesonbuild/meson counts the Meson repository: the build system implemented in Python, with its own test corpus of project skeletons. Both are build-tool source trees, counted on the dates in the methodology line.

The per-language tables reflect each tool's implementation language directly — CMake is implemented in C++, Meson in Python — so the language share is a statement about how each tool is built, not about what it can generate.

A substantial share of both counts is test material: CMake's Tests directory and Meson's test cases each contain many small sample projects, so both totals substantially measure verification infrastructure rather than the tool code alone.

_Tool source-tree size is unrelated to build speed or generated-build quality for a given project; both counts are dominated by long development histories and large test corpora rather than by anything a user of the tool experiences directly._

Sources: [Kitware/CMake repository](https://github.com/Kitware/CMake) · [mesonbuild/meson repository](https://github.com/mesonbuild/meson). Statements verified 2026-09-16.

Evidence and next steps:

- [Kitware/CMake SLOC report](https://octocounts.com/github/Kitware/CMake)
- [mesonbuild/meson SLOC report](https://octocounts.com/github/mesonbuild/meson)
- [Compare Kitware/CMake and mesonbuild/meson interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2FKitware%2FCMake&right=https%3A%2F%2Fgithub.com%2Fmesonbuild%2Fmeson)

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

## Compare FAQ

### Which has more lines of code, Kitware/CMake or mesonbuild/meson?

Kitware/CMake has more code: 1,254,658 code lines versus 141,659 for mesonbuild/meson, about 8.9x as much, based on cached OctoCounts reports as of 2026-09-17.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for Kitware/CMake, mesonbuild/meson, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. Kitware/CMake was counted at ref 833d9466d797619d488448ccb0be2428a77a4aac (commit 833d9466d797) on 2026-09-17; mesonbuild/meson was counted at ref master (commit 6db2b663af92) on 2026-08-26. See the counting methodology for ignored directories and analysis options.

### Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
