You can write multiple report formats with one gcovr invocation by passing the output filename directly to the report format flag. If no filename is specified for the format, the value from -o/--output<gcovr --output>
is used by default, which itself defaults to stdout.
The following report format flags can take an optional output file name:
gcovr --csv
gcovr --txt
gcovr --cobertura
gcovr --html
gcovr --html-details
gcovr --html-nested
gcovr --sonarqube
gcovr --jacoco
gcovr --json
gcovr --json-summary
gcovr --coveralls
If the value given to the output option ends with a path seperator (/
or \
) it is used a directory which is created first and a default filename depending on the format is used.
Note that --html-details<gcovr --html-details>
and --html-nested<gcovr --html-nested>
override any value of --html<gcovr --html>
if it is present.