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

Colorize build output with CMake

    XMLWordPrintable

    Details

    • Story Points:
      2

      Description

      Clang & GCC support writing build output with colors e.g. useful for usability such as highlighting compiler errors. Colorized output is usually enabled on Clang and GCC by default when it detects a terminal that supports colors.

      Unfortunately, when compiling with Ninja (generated by CMake), colors are lost. This is since Ninja intercepts the compiler output, and when the compilers detect they're output is not via a terminal, it will drop ANSI color support. We can however manually enable the compilers to use colors regardless with the -fcolor-diagnostics compiler option.

       

      Definition of Done:

      Update CMake to support compiler output colors by adding the -fcolor-diagnostics (Clang) & -fdiagnostics-color=always (GCC) compiler flags. Ideally this will be enabled by a config option that needs to be explicitly set by the user. It wouldn't be ideal to assume the users terminal environment supports colors by default (or the user wants it enabled).

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: