This is inspired by the `autotools` `make cov` feature, but is not
identical.
Main differences with core:
- The way `autotools` coverage works requires the user to run the build
before calling the `cov` target, in order to build the baseline coverage
data. With `cmake`, the `all` target is built to regenerate the coverage
baseline data.
- The coverage target is associated to the test target. So `ninja
coverage-check` build a coverage report for the `check` target, `ninja
coverage-check-functional` for the `check-functional` target, etc.
To get a global coverage, one can use `ninja coverage-check-all` or
`ninja coverage-check-extended`. It also avoids adding switch at build
time to run the extended tests (what `autotools` does).
Note: the `-DUSE_COVERAGE=1` from core is not ported as it is no longer
in use since D5047.
For now only the association of `lcov`, `gcov` and `genhtml` is
supported (`llvm-cov` requires a wrapper to work as `gcov`).
Depends on D5705.