Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-8231

Add dist script support for CMake formatting

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Storage - Ra 2021-11-29

      Description

      Context

      No different to how we enforce styling over our C sources, we should additionally be ensuring our CMake sources meet an expected format. As we continue modifying and updating our CMake list files we should enforce a format over the build sources such that they adhere to a specific style. This ultimately ensuring our CMake sources stay maintainable & readable.

      This ticket will introduce a new dist script (that can be run under dist/s_all), to parse our CMake list files and format them nicely. This in turn ensures future changes to our CMake files will be appropriately styled and checked on PR's.

      Definition of Done:

      • Determine a tool we can use to format CMake sources.
        • There are a couple of open-source tools we can use. A popular/suggested one is: cmake-format (Unfortunately there is nothing official from KitWare yet).
      • Define a style configuration. Depending on the chosen tool, it will be typically be a configuration file encoding our CMake style preferences
        • Important to collaborate on these definitions (could be with those listed in the "Collaborators" section of this ticket.
      • Implement a 'dist' script that invokes the CMake format tool. This script in turn will be invoked by the 'dist/s_all' script (to ensure its run on future PR's and changes)
      • Perform an initial format of the CMake sources such that it meets our newly defined styling configuration.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-storage-engines Backlog - Storage Engines Team
            Reporter:
            alison.felizzi Alison Felizzi
            Collaborators:
            Alison Felizzi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: