gersemi
« Back to VersTracker
Description:
Formatter to make your CMake code the real treasure
Type: Formula  |  Latest Version: 0.24.0@0  |  Tracked Since: Nov 25, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: cmake formatter developer-tools build-system code-quality
Install: brew install gersemi
About:
Gersemi is a CMake formatter that enforces a consistent style across your project's build scripts. It parses CMake files into an Abstract Syntax Tree (AST) and reconstructs the code according to configurable formatting rules. This tool helps maintain clean, readable, and standardized CMake codebases, especially in collaborative environments.
Key Features:
  • AST-based parsing for robust formatting decisions
  • Configurable formatting rules via a configuration file
  • Idempotent formatting (output is stable across runs)
  • Supports modern CMake syntax and constructs
Use Cases:
  • Enforcing a unified CMake style guide across a team
  • Automated formatting in CI/CD pipelines to prevent style drift
  • Refactoring legacy CMake files to improve readability
Alternatives:
  • cmake-format – cmake-format is a widely used alternative; Gersemi distinguishes itself with a focus on AST-based reconstruction and specific formatting philosophies.
  • gersemi – Built specifically for CMake, offering a more focused feature set than generic code formatters.
Version History
Detected Version Rev Change Commit
Nov 25, 2025 7:58pm 0 VERSION_BUMP c7238747
Oct 18, 2025 4:03pm 0 VERSION_BUMP 95aaf13a
Sep 27, 2025 5:01pm 0 VERSION_BUMP e1213f8c
Sep 11, 2025 12:40pm 0 VERSION_BUMP b4e6897b
Sep 10, 2025 7:00pm 0 VERSION_BUMP b4f816ac