And 2 or 3 or more build targets: project.exe (release build), project-tests.exe, project-debug.exe, maybe 1 more target for measuring performance.
I don't recommend multiple executables for all your tests. I want my tests to run quickly and often. Gtest makes running a subset of tests pretty easy. Ask yourself why do you want more than one exe for your tests? Does the reason imply a poor design? (e.g. global state can't easily be cleaned up.) Maybe you should fix that instead of working around a problem by how you test.
C. Keith Ray
Amplify Your Agility
Coaching | Training | Assessment | eLearning
http://industriallogic.com
Keith answered your question, but I wanted to provide another
perspective, inline with what he says.
Good thing about google test is that it doesn't ascribe or prescribe
anything. You can fit things the way you want in your environment. I
work for PayPal during the day, and I use google test heavily at work.
I use google test outside production code, and make it link with the
library that I am testing. I split tests in to multiple files (easier
to manage tests), but create just one executable. My colleagues are
writing tests as I do, and I have requested them to keep things in
separate executables during the dev phase, and I plan to make them
into a single executable once we are moving over to another feature.
This helps with parallel development to start without having to worry
about treading on each others toes.
We use g++ heavily at work, and I have had kick running gcov, along
with lcov to see coverage as I write tests. Worthy exercise. Have fun!
Thanks
Bala