Machine readable output (non-trace)?

–trace has the lovely --trace-format=json-v1.

Is there something similar for regular cmake output? Having the cmake output in a structured, json form, would be super-useful for embedding cmake results in a larger structured build report.

Not today, no. I suppose SARIF could be output some day, but I don’t know how much work that would end up being.

You might be interested in the following issue discussion which proposes something along the lines of what you’re asking about:

https://gitlab.kitware.com/cmake/cmake/-/issues/19438

1 Like