detect --coverage option from code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I'd like to be able to detect in my C/C++ source code whether the file is being c= ompiled with the "-coverage" (or -test-coverage) option or not.
I've some vague memory of there being a macro for doing that, but my web se= arch and my superficial look at the GCC source code have proven fruitless.

Anybody knows whether that is doable and how to do it ?

(I know I could just add a -D__MY_COVERAGE_DFINE to my compilation options = when doing "-coverage" but that makes the source code less maintainable)

Thanks,
Raul




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux