Providing -DCMAKE_BUILD_TYPE=Coverage
does not work for multi-config generators.
For example:
0$ cmake -S . -B ../build -G "Ninja Multi-Config"
1$ cmake --build ../build --config Coverage
still builds the tests
binary.
This PR:
- fixes this issue
- is based on the in-person discussion during the recent CoreDev
- is an alternative to #1251
The last commit addresses that comment.