views:

74

answers:

2

Hi

My goal is to integrate testing into my development environment (as post-build step). I don't want to interfere with the DLLs that are generated in debug and release, so i plan to create new configurations for the project. But i don't want to compile every source file i have twice - once for the DLL, once for the test unit - I want to share the generated object files. How can I achieve this ?

I am developping in c++ using Visual Studio 2005.

A: 

The compiler has an "intermediate" directory per configuration. If the .obj files in there are newer than the source files it compiles, it won't regenerate them.

xtofl
That could help. But I want to make sure that object files are compiled with the same options no matter which configuration i build first.
Benoît
If you suspect the options may differ, there's no use _not_ rebuilding them. Otherwise you need to compare the compile options for each 'item' in the project.
xtofl
+1  A: 

Compile the objs into a new lib project that is shared between the dll and your test project.

Lou Franco