0

I have to do unit test coverage analysis on a large project with hundreds of c++ sources. It can be built only on Linux with an .sh script, and it doesn't compile the sources with gcov in mind, and it has multiple makefiles. I know this isn't very much info, but what would be a good approach to this?

  • 1
    Find the rules in the makefiles that compile and link, figure out what make variables are used in the recipes for those rules, and modify those variables to contain the flags you need to enable coverage. – MadScientist Apr 14 '18 at 21:25
  • Did you try setting the `CFLAGS` or the `CXXFLAGS` environment variables? You can find some reference [here](https://en.wikipedia.org/wiki/CFLAGS), and also previously asked question [here](https://stackoverflow.com/questions/5541946/cflags-ccflags-cxxflags-what-exactly-do-these-variables-control) for more detailed explanation – AmeyaVS Apr 20 '18 at 04:16

0 Answers0