Domanda

I'm trying to get code coverage info from my C++ project using Xcode 4.6.2 but for some reason I can't figure out how to make Apple LLVM output this info. I've tried to use --coverage compile flag (at "OTHER_C++_FLAGS" option) but for some reason the compiler simply doesn't output the .gcov and .gcda files. Any suggestion? Thank you.

È stato utile?

Soluzione

To generate the code coverage files, you must set the following build settings to YES: Generate Test Coverage Files and Instrument Program Flow. Your project must also generate debug symbols.

Finding the code coverage files can be difficult since they're buried inside your project's build folder. You can find more detailed information on generating code coverage data with LLVM in the following article:

Xcode 4: Generating Code Coverage Files with LLVM

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top