The -j
option of GNU Make is handy although you have to be careful about your dependencies. In my environment it has sped up build and test times 5-6 times. But I want to run my tests with coverage and this creates a problem since the gcov
instrumentation does not handle concurrency well, basically trying to write to the same .gcda
file simultaneously.
I've figured out how to steer coverage information into separate directories for each test, which works. However this incurs the penalty of post-processing all coverage information.
So I'm looking for a way to know if -j
has been used in the invocation, to be able to automatically avoid the extra processing if it is not necessary. Is that possible?