figured it out. the gcna files were being put in non-obvious places in the cmake cache dirs.<div><br><br><div class="gmail_quote">On Sun, Sep 23, 2012 at 1:33 AM, Aaron Smith <span dir="ltr"><<a href="mailto:gngrwzrd.lists@gmail.com" target="_blank">gngrwzrd.lists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm working on a C project and using CMake. I've been trying to get coverage testing working and am just about there.<div>
<br></div><div>This is what I have figured out so far:</div><div><br></div><div>-use clang for c compiler. "gcc" on the latest Xcode does nothing with -fprofile-arcs and -ftest-coverage</div>
<div>-add -fprofile-arcs and -ftest-coverage to c debug flags</div><div>-set cmake build type to debug</div><div>-run cmake to build makefile</div><div>-double check that gcno files are created for each source file compiled (they are).</div>
<div><br></div><div>This is where i'm stuck now. I run one of my unit tests and I don't get any .gcna files created.</div><div><br></div><div>The strange thing is that when I use CMake to generate an Xcode project, and turn on "Generate Test Coverage Files" and "Instrument Program Flow", I get both gcno and gcna files.</div>
<div><br></div><div>Anyone else experienced this?</div><div><br></div><div>Thanks!</div>
</blockquote></div><br></div>