Setting up gcov in Xcode 3.1
I am trying to set my Xcode project to tools using gcov so that I can determine the code coverage of my unit tests. All the documentation I find on the internet talks about settings that I didn't find in Xcode 3.1. Example:
To work with Coverstory, you first need to set up your target to work with gcov. To do this, you need to enable "Application Program Flow", "Generate Test Coverage Files" and link it with the gcov library. ( Using Coverstory )
The closest thing I can find in the Workflow and Generate Control Coverage Files in my build settings is Generate Profiling Code, which doesn't seem to do what I want.
Am I looking for the wrong place for these settings, or are all the examples I find on the internet out of date?
source to share
Update. I looked at my notes again when I first asked this - your "base SDK" must be the same as the current build target, otherwise the options you need won't show up:
http://iphonesdkdev.blogspot.com/2009/05/xcode-gcc-section-missing-in-build.html
FYI, my Workbench and Generate Test Coverage Files options are displayed under the heading GCC 4.0 - Code Generation.
I remember similar issues with hidden build settings - usually due to dependency on another build setting, for example. two from my project that I know are the gist:
-C / C ++ compiler version = GCC 4.0
-Base SDK = iPhone Simulator 2.1 (missing)
source to share
You can also check out the Google Toolbox plugin for Mac Xcode, which adds menu items to easily customize code coverage:
http://code.google.com/p/google-toolbox-for-mac/wiki/GTMXcodePlugin
source to share