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 under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.
This page compares the source lines of code (SLOC) of Kitware/CMake and mesonbuild/meson using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.
As of 2026-11-24, Kitware/CMake contains 1,774,919 total lines (1,300,486 code) across 31,504 files, while mesonbuild/meson contains 188,381 total lines (146,016 code) across 4,923 files as of 2026-11-23. Kitware/CMake has about 8.9x the counted code lines of mesonbuild/meson under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | Kitware/CMake | mesonbuild/meson |
|---|---|---|
| Files | 31,504 | 4,923 |
| Total lines | 1,774,919 | 188,381 |
| Code lines | 1,300,486 | 146,016 |
| Comment lines | 251,438 | 15,070 |
| Blank lines | 222,995 | 27,295 |
| Languages counted | 59 | 50 |
Top languages in Kitware/CMake: C (28.8% of code), C++ (24.5% of code), CMake (22.0% of code). Top languages in mesonbuild/meson: Python (70.2% 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 master (commit 4207edd6abca) on 2026-11-24; mesonbuild/meson was counted at ref master (commit 8f62bd38bab6) on 2026-11-23. See the counting methodology for ignored directories and analysis options.
Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. Kitware/CMake: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. mesonbuild/meson: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.
About this comparison
Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: Kitware/CMake is 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 is 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.
Tool source-tree size is unrelated to build speed or generated-build quality for a given project; the counts describe the source remaining after the stated filters, not how either tool performs for its users.
Sources: Kitware/CMake repository · mesonbuild/meson repository. Statements verified 2026-09-16.
Evidence and next steps:
- Kitware/CMake SLOC report
- mesonbuild/meson SLOC report
- Compare Kitware/CMake and mesonbuild/meson interactively
- Kitware/CMake saved report
- mesonbuild/meson saved report
Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.
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?
As of 2026-11-24, Kitware/CMake contains 1,774,919 total lines (1,300,486 code) across 31,504 files, while mesonbuild/meson contains 188,381 total lines (146,016 code) across 4,923 files as of 2026-11-23. Kitware/CMake has about 8.9x the counted code lines of mesonbuild/meson under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
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 master (commit 4207edd6abca) on 2026-11-24; mesonbuild/meson was counted at ref master (commit 8f62bd38bab6) on 2026-11-23. 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.