views:

253

answers:

1

I have two projects - one with a static library target and a unit test target - one with an application target that is dependent on the static library and it's own unit test target

In the static library project, I can only do a 'Build' or 'Build and Analyze'. If I build the unit test target, the tests are run, but there does not seem to be a way to run anything with the performance tools so I can check for leaks, etc.

What is the best way to use the XCode performance tools with the static library project?

  • add a simple executable target to the static library test target?
    (Not quite sure what that would mean)

  • add a simple Application target that runs unit tests or otherwise exercises the library

  • something else?

Any advice would be appreciated.

Doug

+1  A: 

Your second approach is the correct one. You need some kind of application for the performance tools to chew on. Tools like Instruments are run-time analysis tools; a static library by itself cannot be analyzed by such a tool (that's what static analysis is for).

Rob Napier