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-16, Kitware/CMake contains 1,771,002 total lines (1,297,483 code) across 31,385 files, while mesonbuild/meson contains 188,295 total lines (145,956 code) across 4,922 files as of 2026-11-15. 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.

MetricKitware/CMakemesonbuild/meson
Files31,3854,922
Total lines1,771,002188,295
Code lines1,297,483145,956
Comment lines250,83615,055
Blank lines222,68327,284
Languages counted5950

Top languages in Kitware/CMake: C (28.8% of code), C++ (24.5% of code), CMake (21.9% 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 c42dca42c876) on 2026-11-16; mesonbuild/meson was counted at ref master (commit bc09128681d3) on 2026-11-15. 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:

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-16, Kitware/CMake contains 1,771,002 total lines (1,297,483 code) across 31,385 files, while mesonbuild/meson contains 188,295 total lines (145,956 code) across 4,922 files as of 2026-11-15. 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 c42dca42c876) on 2026-11-16; mesonbuild/meson was counted at ref master (commit bc09128681d3) on 2026-11-15. 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.